home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TA / (A)TAS.ADF / clock297 / clock297.asm < prev   
Assembly Source File  |  1988-09-05  |  90KB  |  4,214 lines

  1. * * Clockdj *
  2.  
  3.     nolist
  4.     
  5. ********* assembler offset files needed for this to work
  6.     include    "exec/types.i"
  7.     include    "exec/nodes.i"
  8.     include    "exec/lists.i"
  9.     INCLUDE    "exec/interrupts.i"
  10.     INCLUDE    "devices/input.i"
  11.     INCLUDE    "hardware/intbits.i"
  12.     INCLUDE    "devices/inputevent.i"
  13.     include    "offsets/rom.ofs"
  14.     include "exec/io.i"
  15.     include "graphics/view.i"
  16.     include "graphics/sprite.i"
  17.     include "graphics/copper.i"
  18.     include "graphics/gfxbase.i"
  19.  
  20.     include "intuition/preferences.i"
  21.     include "intuition/screens.i"
  22.     include    "exec/memory.i"
  23.     include    "intuition/intuition.i"
  24.     include    "libraries/dos.i"
  25.     list
  26. *    llen    80
  27.     
  28.  
  29.     bra    clockdjstart
  30.  
  31.     dc.b    'Clockdj V2.97'    
  32.  
  33.     cnop     0,2
  34. clockdjstart
  35.  
  36.     cmpi.b    #10,(a0)    any data
  37.     beq    noparm        no
  38.     move.b    (a0),revswitch    set reverse button switch
  39.     moveq    #80,d0        maximum initial length
  40.     lea    itext0,a1    Text for menu
  41.     lea    newcli,a2    command area    
  42.     lea    2(a0),a0    next field
  43.     moveq    #0,d2
  44.     moveq    #0,d3
  45. newinit    cmpi.b    #10,(a0)    end
  46.     beq    noparm
  47. newinit2 
  48.     cmpi.b    #10,(a0)    end
  49.     beq    clrend
  50.     tst.l    d2
  51.     bne.s    3$
  52.     cmpi.b    #8,d3        end?
  53.     beq.s    2$
  54.     cmpi.b    #' ',(a0)    end of initial command?
  55.     bne.s    1$    
  56. 2$    not.l    d2        set switch    
  57.     bra    3$
  58. 1$    move.b    (a0),(a1)+    
  59. 3$    move.b    (a0)+,(a2)+    
  60.     addq.b    #1,d3
  61.     dbra    d0,newinit2
  62. clrend
  63.     clr.b    (a2)        end of newcli 
  64.  
  65. noparm
  66.     lea     layersname,a1
  67.     MOVEQ   #0,D0        ; load version number
  68.     MOVEA.L 4,A6        ; load exec library address
  69.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  70.     TST.L   D0        ok?
  71.     bne    layok        yes
  72.     rts
  73. layok    MOVE.L    D0,layers        save
  74.  
  75.  
  76.     lea     dosname,A1
  77.     MOVEQ   #0,D0        ; load version number
  78.     MOVEA.L 4,A6        ; load exec library address
  79.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  80.     TST.L   D0        ok?
  81.     bne    4$        yes
  82.     bra    layerbye
  83.  
  84. 4$    MOVE.L    D0,a6        save
  85.  
  86.     lea    savefile,a0    name of save string
  87.     move.l    a0,d1        move into right reg
  88.     move.l    #MODE_OLDFILE,d2 old file
  89.     jsr    Open(a6)    Open
  90.     tst.l    d0        file there?
  91.     beq.s    closedos    no use defaults
  92.  
  93.     move.l    d0,d1        file handle
  94.     move.l    #diskbufferl,d4    length expected
  95.     lea    diskbuffer,a4
  96. readin
  97.     move.l    a4,d2        data
  98.     move.l    #1,d3        data length
  99.     move.l    d1,-(a7)    save handle
  100.     jsr    Read(a6)    read it in
  101.     move.l    (a7)+,d1    restore file handle
  102.     tst.l    d0        test result
  103.     beq    closein        eof
  104.     bmi    closein        error
  105.     adda    #1,a4        next
  106.     dbra    d4,readin
  107. closein
  108.     jsr    Close(a6)    close file
  109. closedos
  110.     MOVE.L    a6,a1        dos Library
  111.     movea.l    4,a6        Exec base 
  112.     jsr    CloseLibrary(A6) call CloseLibrary
  113. nofile            
  114.     lea    window,a0    new window structure
  115.     move.w    windowleft,nw_LeftEdge(a0)    restore 
  116.     move.w    windowtop,nw_TopEdge(a0)        window
  117.     
  118.     cmpi.b    #memtot,memory    total memory display?
  119.     beq.s    2$        yes
  120.  
  121. ******* set up window for chip/fast memory display *********
  122.  
  123.     lea    itext1b,a1    new text
  124.     move.w    #312,nw_Width(a0)    set new width
  125.     lea    sepmsg,a2        new message text
  126.     bra.s    3$
  127.  
  128. ******** set up window for total memory display
  129.  
  130. 2$    lea    itext1,a1    new text
  131.     lea    totmsg,a2        new message text
  132. 3$    move.l    a1,memtext    set up text
  133.     lea    Date_Text,a0    message structure 
  134.     move.l    a2,it_IText(a0)    set up message address
  135.     move.w    colours,Date_Text restore colours
  136.  
  137. ****** set up priority check mark ********
  138.  
  139.     lea    priindex,a0    index of fields
  140.     moveq    #0,d0
  141.     move.b    priority,d0    get priority
  142.     ext.w    d0        extend sign
  143.     addq    #3,d0        create
  144.     lsl.l    #2,d0                index
  145.     movea.l    0(a0,d0),a1
  146.     ori.w    #CHECKED,0(a1)     set check mark
  147.  
  148.  
  149. ****** set up refresh check mark ********    
  150.  
  151.     cmpi.l    #100000,refrate    
  152.     bne.s    not10
  153.     ori.w    #CHECKED,ref1
  154.     bra    blankcheck
  155. not10    cmpi.l    #200000,refrate    
  156.     bne.s    not20
  157.     ori.w    #CHECKED,ref2
  158.     bra    blankcheck
  159. not20    cmpi.l    #500000,refrate    
  160.     bne.s    not50
  161.     ori.w    #CHECKED,ref3
  162.     bra    blankcheck
  163. not50    cmpi.l    #999999,refrate    
  164.     bne.s    not10
  165.     ori.w    #CHECKED,ref4
  166.  
  167. ********* Set up blank check mark ********
  168.  
  169. blankcheck
  170.     cmpi.w    #0,blanktime
  171.     bne.s    notb0
  172.     ori.w    #CHECKED,blach1
  173.     bra    pointcheck
  174. notb0    cmpi.w    #5*60,blanktime
  175.     bne.s    notb5
  176.     ori.w    #CHECKED,blach2
  177.     bra    pointcheck
  178. notb5    cmpi.w    #10*60,blanktime
  179.     bne.s    notb10
  180.     ori.w    #CHECKED,blach3
  181.     bra    pointcheck
  182. notb10    cmpi.w    #20*60,blanktime
  183.     bne.s    notb20
  184.     ori.w    #CHECKED,blach4
  185.     bra    pointcheck
  186. notb20    cmpi.w    #30*60,blanktime
  187.     bne.s    notb30
  188.     ori.w    #CHECKED,blach5
  189.     bra    pointcheck
  190. notb30    ori.w    #CHECKED,blach6
  191.     
  192. ********* Set up blank check mark ********
  193.  
  194. pointcheck
  195.     
  196.     cmpi.w    #0,pointtime
  197.     bne.s    notp0
  198.     ori.w    #CHECKED,poich1
  199.     bra    speedset
  200. notp0    cmpi.w    #5,pointtime
  201.     bne.s    notp5
  202.     ori.w    #CHECKED,poich2
  203.     bra    speedset
  204. notp5    cmpi.w    #10,pointtime
  205.     bne.s    notp10
  206.     ori.w    #CHECKED,poich3
  207.     bra    speedset
  208. notp10    cmpi.w    #20,pointtime
  209.     bne.s    notp20
  210.     ori.w    #CHECKED,poich4
  211.     bra    speedset
  212. notp20    cmpi.w    #30,pointtime
  213.     bne.s    notp30
  214.     ori.w    #CHECKED,poich5
  215.     bra    speedset
  216. notp30    ori.w    #CHECKED,poich6
  217.     
  218. **** set mouse speed check mark
  219.  
  220. speedset
  221.     moveq    #0,d0
  222.     move.b    mousespeed,d0        get speed
  223.     lsl.l    #2,d0            *4
  224.     lea    mousecheck,a0        addreses
  225.     movea.l    0(a0,d0),a1        get address
  226.     ori.w    #CHECKED,(a1)        set check mark
  227.  
  228. ****** set sun mouse check mark
  229.  
  230.     tst.b    sunswitch        sun mouse on?
  231.     beq    ftest            no
  232.     ori.w    #CHECKED,suncheck    set tick
  233.  
  234. ****** set window to front check mark
  235.  
  236. ftest    tst.b    wtfcount        neg?
  237.     bmi    fset0x            yes
  238. fcheckdo
  239.     moveq    #0,d0
  240.     move.b    wtfcount,d0        get speed
  241.     lsl.l    #2,d0            *4
  242.     lea    frontcheckr,a0        addreses
  243.     movea.l    0(a0,d0),a1        get address
  244.     ori.w    #CHECKED,(a1)        set check mark
  245.     bra    btest
  246. fset0x    clr.b    wtfcount
  247.     bra    fcheckdo
  248. ****** set window to back check mark
  249.  
  250. btest    tst.b    backswitch        sun mouse on?
  251.     bmi    bset0x            no
  252. bcheckdo
  253.     moveq    #0,d0
  254.     move.b    wtbcount,d0        get speed
  255.     lsl.l    #2,d0            *4
  256.     lea    backcheckr,a0        addreses
  257.     movea.l    0(a0,d0),a1        get address
  258.     ori.w    #CHECKED,(a1)        set check mark
  259.     bra    ctest
  260. bset0x    clr.b    wtbcount
  261.     bra    bcheckdo
  262.  
  263. ****** set screen cycle check mark
  264.  
  265. ctest    tst.b    cycleswitch        screen cycle on?
  266.     beq    ktest            no
  267.     ori.w    #CHECKED,cyclecheck    set tick
  268.  
  269.  
  270. ****** set key to front check mark
  271.  
  272. ktest    tst.b    keyswitch        key to front on?
  273.     beq    ptest            no
  274.     ori.w    #CHECKED,keycheck    set tick
  275.  
  276. ****** set pop to front check mark
  277.  
  278. ptest    tst.b    popswitch        key to front on?
  279.     beq    iopen            no
  280.     ori.w    #CHECKED,wtfcheck    set tick
  281.  
  282. ***** open intuition library and store its pointer  *****
  283.         
  284. iopen    LEA     IntuitionName(PC),A1
  285.     MOVEQ   #0,D0        ; load version number
  286.     MOVEA.L 4,A6        ; load exec library address
  287.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  288.     TST.L   D0
  289.     BNE.S   *+4
  290.     RTS            ; FAIL: couldn't open intuition library
  291.     MOVE.L    D0,intuit    ; store intuition library pointer
  292.  
  293.  
  294. ********* open window
  295.  
  296.     lea    window,a0
  297.     movea.l  intuit,A6
  298.     JSR     OpenWindow(A6)    ; call OpenWindow
  299.  
  300.     TST.L   D0
  301.     BEQ.L   FailOpenWindow
  302.     movea.l    d0,a0
  303.     move.l    wd_WLayer(a0),layer    window layer
  304.     movea.l    wd_WScreen(a0),a1    screen pointer
  305.     lea    sc_LayerInfo(a1),a0     get Layer_info address
  306.     move.l    a0,layerinfo        save
  307.     
  308.  
  309. ****** set up menu strip
  310.  
  311.     movea.l    d0,a3        save window pointer
  312.     movea.l    d0,a0        
  313.     lea    menu0,a1    menu structure
  314.     jsr    SetMenuStrip(a6) set up menu
  315.  
  316.  
  317. WindowOpened:
  318.  
  319. ;============================================================================
  320. ; Initialise the intput handler structure.
  321. ;============================================================================
  322.  
  323.     move.b    #NT_INTERRUPT,inthandler+LN_TYPE  set the node type
  324.     move.b    #127,inthandler+LN_PRI    I want to be first
  325.     move.l    #datarea,inthandler+IS_DATA handler can see data
  326.     move.l    #intcode,inthandler+IS_CODE    point to code
  327.  
  328. ;============================================================================
  329. ; get a signal bit for input handler 
  330. ;============================================================================
  331.     movea.l    4,a6            using exec.library again
  332.     moveq.l    #-1,d0            any signal will do
  333.     jsr    AllocSignal(a6)
  334.     moveq.l    #0,d1            convert signum to a mask
  335.     bset.l    d0,d1
  336.     move.l    d1,insig        save
  337.     move.l    d1,d7            stash  sig bit
  338.         
  339.  
  340. ; get ClockWindow->UserPort->mp_SigBit into D0
  341.     MOVEA.L wd_UserPort(A3),A0   A0 = ClockWindow->UserPort
  342.     MOVEQ   #0,D0
  343.     MOVE.B  MP_SIGBIT(A0),D0  D0 = the ClockWindow's mp_SigBit
  344.     MOVEQ   #1,D4
  345.     LSL.L   D0,D4        ; D4 = windowSigs
  346.     or.l    D4,D7        ; D7 = waitFlags
  347.  
  348. ***** create timer port *****
  349.  
  350.     movea.l 4,A6        load exec library address
  351.     ; get a signal bit
  352.     MOVEQ   #-1,D0
  353.     JSR     AllocSignal(A6)    ; call AllocSignal
  354.     MOVE.L  D0,D3        ; D3 = sigBit
  355.     BMI    FailCreateTimer1
  356.  
  357.  
  358. * alloc sprite data
  359.  
  360.     moveq    #11*4,D0        size of structure
  361.     MOVE.L  #MEMF_CLEAR+MEMF_CHIP,D1 memory type = CLEAR and CHIP
  362.     JSR     AllocMem(A6)    ; call AllocMem
  363.     MOVE.L  D0,spriteblank
  364.  
  365.  
  366. ; alloc port structure
  367.     moveq   #MP_SIZE,D0        size of structure
  368.     MOVE.L  #MEMF_CLEAR+MEMF_PUBLIC,D1 memory type = CLEAR and PUBLIC
  369.     JSR     AllocMem(A6)    ; call AllocMem
  370.     MOVE.L  D0,D5        ; D5 = timer Port
  371.     BNE.S   SkipFailCode
  372.     ; AllocMem failed
  373.     MOVE.L  D3,D0
  374.     JSR     FreeSignal(A6)    ; call FreeSignal
  375.     BRA     FailCreateTimer2
  376. SkipFailCode:
  377.     ; fill port fields
  378.     MOVEA.L D5,A2
  379.     ADDQ.L  #LN_TYPE,A2    ; A2 now points to the LN_TYPE field        
  380.     MOVE.W  #NT_MSGPORT+LN_PRI,(A2)+ LN_TYPE = NT_MSGPORT, LN_PRI = 0
  381.     LEA    TimerPortName(PC),A0
  382.     MOVE.L  A0,(A2)+    ; LN_NAME = address of timer port name
  383.     MOVE.W  D3,(A2)+    ; MP_FLAGS = (#PA_SIGNAL=0), MP_SIGBIT = sigBit
  384.     MOVEQ   #0,D0
  385.     MOVEA.L D0,A1
  386.     JSR     FindTask(A6)    ; call FindTask ( 0 arg means this task)
  387.     MOVE.L  D0,(A2)        ; MP_SIGTASK = pointer to found task
  388.     move.l    d0,task        save task pointer
  389.     move.l    d0,a1        my task
  390.     moveq    #0,d0
  391.     move.b    #50,d0        Priority 2                            
  392.     jsr    SetTaskPri(a6)    call SetTaskPri
  393.  
  394.  
  395. ** get input device port space 
  396.  
  397.     movea.l    4,a6            exec base
  398.     moveq   #MP_SIZE,d0        size of structure
  399.     move.l  #MEMF_CLEAR+MEMF_PUBLIC,d1 memory type = CLEAR and PUBLIC
  400.     jsr     AllocMem(a6)    call AllocMem
  401.  
  402.     move.l  d0,inputport    save input Port
  403.     bne    gotsp
  404.     moveq    #8,d0
  405.     rts            Big trouble. give up
  406.  
  407.  
  408. ** fill in  port fields 
  409.  
  410. gotsp    movea.l    inputport,a1
  411.     move.b  #NT_MESSAGE,LN_TYPE(a1) LN_TYPE = NT_MESSAGE(5)
  412.     move.l    #inputportname,LN_NAME(a1)    name
  413.  
  414. * stick task in the msg port.
  415.  
  416.     move.l    task,MP_SIGTASK(a1)    task pointer
  417.  
  418.  
  419.     BRA     SkipFailSection
  420.  
  421. ********** FAILURE SECTION ************
  422. ClosedWindow:
  423. * abort any standing timer request
  424.     movea.l    4,a6        exec base
  425.     MOVEA.L timer,A1    timer IORequest
  426.     ABORTIO
  427.     ; close timer device
  428.     movea.l timer,A1    timer IORequest
  429.     JSR     CloseDevice(A6)    ; call CloseDevice
  430.  
  431. * Free timer request storage
  432.  
  433.     movea.l timer,A1    timer IORequest
  434.     moveq   #MP_SIZE,D0    size of structure
  435.     jsr     FreeMem(A6)    call FreeMem
  436.  
  437. FailOpenDevice:
  438. FailTimeRequestAlloc:
  439.     ; close timer port
  440.     MOVEA.L D5,A1
  441.     JSR     RemPort(A6)    ; call RemPort
  442.     MOVEA.L D5,A2
  443.     MOVEQ   #-1,D6
  444.     MOVE.B  D6,$A(A2)
  445.     MOVE.L  D6,(A2)
  446.     MOVE.L  (SP)+,D0    ; get the sigBit
  447.     JSR     FreeSignal(A6)    ; call FreeSignal
  448.     move.l    insig,d0    input handler signal
  449.     JSR     FreeSignal(A6)    ; call FreeSignal
  450.     MOVEA.L D5,A1
  451.     MOVEQ   #$22,D0
  452.     JSR     FreeMem(A6)    ; call FreeMem
  453.  
  454. FailCreateTimer2:
  455. FailCreateTimer1:
  456.     MOVEA.L A3,A0
  457.     movea.l  intuit,A6
  458.     jsr    ClearMenuStrip(a6) remove menu
  459.     MOVEA.L A3,A0
  460.     JSR     CloseWindow(A6)    ; call CloseWindow
  461.  
  462. FailOpenWindow:
  463.     movea.l    intuit,A1    Intuition Library
  464.     movea.l    4,a6        exec base
  465.     JSR    CloseLibrary(A6) call CloseLibrary    
  466.  
  467.  
  468. ;============================================================================
  469. ;  remove intput handler 
  470. ;============================================================================
  471.  
  472.     movea.l    4,a6        using exec.library
  473.     lea    inputreq,a1    
  474.     move.l    #inthandler,IO_DATA(a1)     
  475.     move.l    #IS_SIZE,IO_LENGTH(a1)    set length 
  476.     move.w    #IND_REMHANDLER,IO_COMMAND(a1)    remove handler 
  477.  
  478.     move.l    4,a6
  479.     jsr    DoIO(a6)
  480.  
  481.     lea    inputreq,A1    input IORequest
  482.     JSR     CloseDevice(A6)    ; call CloseDevice
  483.  
  484.     movea.l  inputport,a1      Remove the input Port
  485.         jsr      RemPort(a6)
  486.  
  487.     movea.l inputport,a1    input port
  488.     moveq   #MP_SIZE,D0    size of structure
  489.     jsr     FreeMem(A6)    call FreeMem
  490.  
  491.     movea.l spriteblank,a1    input port
  492.     moveq      #11*4,D0    size of structure
  493.     jsr     FreeMem(A6)    call FreeMem
  494.  
  495. layerbye MOVE.L    layers,a1    layers
  496.     MOVEA.L 4,A6        ; load exec library address
  497.     JSR     CloseLibrary(A6)     call CloseLibrary
  498.     moveq    #0,d0
  499.     rts
  500.  
  501. ********* FAILURE END **********
  502.  
  503. SkipFailSection:
  504. ; add the ports
  505.     MOVEA.L D5,A1
  506.     movea.l    4,a6        Exec base
  507.     JSR     AddPort(A6)    ; call AddPort
  508.  
  509.         move.l   inputport,a1     Message Port
  510.         jsr      AddPort(a6)   Add another Port to list
  511.  
  512.  
  513. ** Set up input IOReq structures
  514.     
  515.  
  516.     lea    inputreq,a1    IORequest
  517.     move.b  #NT_MESSAGE,LN_TYPE(a1) LN_TYPE = NT_MESSAGE(5)
  518.     move.b  #0,LN_PRI(a1)     LN_PRI = 0
  519.     move.l  inputport,MN_REPLYPORT(a1) move in message port pointer
  520.  
  521. ** open input device 
  522.  
  523.  
  524.  
  525.     lea    inputname,a0        device name
  526.     moveq    #0,d0            unit number        
  527.     lea    inputreq,a1        IOReq
  528.     moveq    #0,d1            flags
  529.     jsr    OpenDevice(a6)    
  530.     lea    inputreq,a1        IOReq
  531.     cmpi.b    #0,IO_ERROR(a1)        ok?
  532.     beq.s    openok            yes
  533.     moveq    #0,d0
  534.     move.b    IO_ERROR(a1),d0
  535.     rts
  536.  
  537. openok
  538.     move.l    #inthandler,IO_DATA(a1)     
  539.     move.l    #IS_SIZE,IO_LENGTH(a1)    set length 
  540.     move.w    #IND_ADDHANDLER,IO_COMMAND(a1) 
  541.  
  542. ;============================================================================
  543. ; now that everything is initialised,  add the input handler
  544. ;============================================================================
  545.  
  546.     lea    inputreq,a1    
  547.     move.l    4,a6
  548.     jsr    DoIO(a6)
  549.  
  550.  
  551. ***** use the timer port sigBit(D3) to set the timeOutSig(D6) *****
  552.  
  553.     MOVE.L  D3,D0
  554.     MOVE.L    D3,-(SP)    ; save the sigBit
  555.     MOVEQ   #1,D6
  556.     LSL.L   D0,D6
  557.     OR.L    D6,D7        ; update the waitFlags
  558.  
  559. ***** initialize timeRequest structure *****
  560.  
  561.     MOVEQ   #IOTV_SIZE,D0        D0 = IOTV_SIZE
  562.     MOVE.L  #MEMF_CLEAR+MEMF_PUBLIC,D1 memory type = clear it, and public
  563.     JSR     AllocMem(A6)    ; call AllocMem
  564.     TST.L   D0
  565.     BEQ     FailTimeRequestAlloc
  566.     MOVEA.L D0,A5        ; A5 = timeRequest
  567.     move.l    d0,timer    save timer IORequest
  568.     move.b  #NT_MESSAGE,LN_TYPE(A5) LN_TYPE = NT_MESSAGE(5)
  569.     move.b  #0,LN_PRI(A5)     LN_PRI = 0
  570.     MOVE.L  D5,MN_REPLYPORT(A5) MN_REPLYPORT = timerPort
  571.                 ; AllocMem set to zero the IO_FLAGS, IO_ERROR fields
  572.  
  573. ***** open vblank timer device *****
  574.  
  575.     LEA     TimerName(PC),A0    ; A0 = timer name
  576.     MOVEA.L A5,A1        ; A1 = timeRequest
  577.     MOVEQ   #1,D0        ; D0 = UNIT_VBLANK(1)
  578.     MOVEQ   #0,D1
  579.     JSR     OpenDevice(A6)    ; call OpenDevice
  580.     TST.L   D0
  581.     BNE     FailOpenDevice
  582.     MOVE.W  #TR_ADDREQUEST,IO_COMMAND(A5) IO_COMMAND = TR_ADDREQUEST(9)
  583.  
  584. ***** initialize main loop *****
  585.  
  586.     LEA     buffer(PC),A2    ; A2 = bufferPTR
  587.     LEA    InitMainLoop(PC),A4
  588.     BRA     InitializeTime
  589. InitMainLoop:    
  590.     LEA    WhileMoreMessages(PC),A4
  591. MainLoop:
  592.     MOVE.L  D7,D0        ; D0 = waitFlags
  593.     movea.l    4,a6        Exec base
  594.     JSR     Wait(A6)    ; call Wait
  595.     move.l    d0,d3        save
  596.     move.l    insig,d1    sigbit for input device
  597.     and.l    d0,d1        input signal
  598.     beq    notinput    not input device
  599.  
  600. **  process input events
  601.  
  602. processinput
  603.  
  604. *** test for window expand
  605.  
  606.     cmp.b    #'e',action    do delete window?
  607.     bne    delwintest        no
  608.  
  609.     move.l    #windowtabl/16-1,d0    entries
  610.     lea    windowtab,a1        start of table 
  611.     add.l    #windowtabl-16,a1    end of table
  612. wtab2    tst.l    (a1)            free?
  613.     bne    gotlast            yes
  614.     suba.l    #16,a1            down 1
  615.     dbra    d0,wtab2            
  616.     bra    notinput        no more - ignore
  617.  
  618. gotlast 
  619.     movem.l    a2-a5/d2-d7,-(sp)
  620.     move.l    intuit,a6        intuition base
  621.     move.l    (a1),a0        window
  622.  
  623.     move.l    ib_ActiveScreen(a6),d1     get active screen
  624.  
  625.     move.l    #windowtab,d2        start of table 
  626.     move.l    #windowtabl/16-1,d0    entries
  627. slook    cmp.l    4(a1),d1        same screen?
  628.     beq    gotwscreen        yes
  629.     suba.l    #16,a1            next entry
  630.     cmp    a1,d2            at start?            
  631.     bne    slook
  632.     movem.l    (sp)+,a2-a5/d2-d7
  633.     bra    notinput
  634.  
  635. gotwscreen
  636.  
  637. ***  look for window
  638.     move.l    d1,a0            
  639.     move.l    sc_FirstWindow(a0),a2    get first window    
  640.     move.l    a2,d2    
  641. nextlwin2
  642.     move.l    d2,a2
  643.     cmp.l    0(a1),d2    right one?    
  644.     beq    gotewind            yes
  645.     move.l    wd_NextWindow(a2),d2    get next window
  646.     beq    weend                no more
  647.     bra    nextlwin2
  648.  
  649. gotewind
  650.     moveq    #0,d0
  651.     moveq    #0,d1
  652.     move.l    (a1),a0
  653.     move.w    12(a1),d0    x position
  654.     move.w    14(a1),d1    y position
  655.     move.l    a1,-(sp)
  656.     jsr    MoveWindow(a6)
  657.     move.l    (sp)+,a1
  658.     move.l    (a1),a0        window
  659.     moveq    #0,d0
  660.     moveq    #0,d1
  661.     move.w    8(a1),d0    x amount
  662.     move.w    10(a1),d1    y amount
  663.     subq    #1,d0
  664.     subq    #1,d1
  665.     move.l    a1,-(sp)            delete entry
  666.     jsr    SizeWindow(a6)        like a rabbit out of a hat
  667.     move.l    (sp)+,a1
  668. weend    move.l    a1,d0
  669.     sub.l    #windowtab,d0
  670.     move.l    #windowtabl,d1
  671.     sub.l    d0,d1        get move length
  672.     sub.l    #16,d1        
  673.     divu    #4,d1        in long words
  674.     ext.l    d1
  675.     subq    #1,d1
  676.     lea    (a1),a2        to address
  677.     lea    16(a1),a3    from address
  678. clearentry
  679.     move.l    (a3)+,(a2)+
  680.     dbra    d1,clearentry
  681.     movem.l    (sp)+,a2-a5/d2-d7
  682.     bra    notinput
  683.     
  684. *** test for window shrink
  685.  
  686. delwintest
  687.     cmp.b    #'d',action    do delete window?
  688.     bne    newclitst        no
  689.  
  690. * get next available slot
  691.     lea    windowtab,a1        start of table 
  692.     move.l    #windowtabl/16-1,d0    entries
  693. wtab    tst.l    (a1)            free?
  694.     beq    gotwspace        yes
  695.     adda.l    #16,a1            next entry
  696.     dbra    d0,wtab            
  697.     bra    notinput        no space - ignore
  698. gotwspace    
  699.     move.l    a1,-(sp)
  700.     bsr    windowpointer        find where pointer is
  701.     move.l    (sp)+,a1
  702.     tst.l    d0            got window?
  703.     beq    notinput        no    
  704.     move.l    d0,a0        
  705.     tst.l    wd_UserPort(a0)
  706.     bne.s    1$
  707.     tst.l    wd_WindowPort(a0)
  708.     beq    notinput
  709. 1$    move.l    d0,(a1)            save window pointer
  710.     moveq    #0,d0
  711.     moveq    #0,d1
  712.     move.l    wd_WScreen(a0),4(a1)    save screen
  713.     move.w    wd_Width(a0),d0        width
  714.     move.w    wd_Height(a0),d1    height
  715.     move.w    wd_Width(a0),8(a1)    width
  716.     move.w    wd_Height(a0),10(a1)    height
  717.     move.w    wd_LeftEdge(a0),12(a1)    x position
  718.     move.w    wd_TopEdge(a0),14(a1)    y position
  719.     move.l    intuit,a6        intuition base
  720.     subq    #1,d0
  721.     subq    #1,d1
  722.     neg.l    d0
  723.     neg.l    d1
  724.     move.l    a0,-(sp)
  725.     jsr    SizeWindow(a6)        vapourize
  726.     move.l    (sp)+,a0
  727.     move.q    #0,d0
  728.     moveq    #0,d1
  729.     move.w    wd_LeftEdge(a0),d0    x position
  730.     move.w    wd_TopEdge(a0),d1    y position
  731.     neg.l    d0
  732.     neg.l    d1
  733.     jsr    MoveWindow(a6)
  734.     bra    notinput
  735.  
  736. *** test for newcli
  737.  
  738. newclitst
  739.     cmp.b    #'n',action    do newcli?
  740.     bne.s    sunact        no
  741.     move.l    wd_WScreen(a3),a0 screen pointer
  742.     move.l    intuit,a6
  743.     move.l    ib_ActiveScreen(a6),d0    get active screen    
  744.     cmp.l    a0,d0        is my screen the active one?
  745.     beq    donewcli    yes
  746.     jsr    ScreenToFront(a6)    
  747.     bra    donewcli    
  748.  
  749. sunact    cmp.b    #'f',action    flip windows?
  750.     bne    winflip
  751.  
  752.     bsr    windowpointer        find where pointer is
  753.     tst.l    d0            got window?
  754.     beq    notinput        no
  755.     move.l    intuit,a6
  756.      cmp.l    ib_ActiveWindow(a6),d0     active window?    
  757.     beq    notinput        yes
  758.  
  759.  
  760.     move.l    a0,-(sp)
  761.     move.l    d0,a0            activate this window
  762.     jsr    ActivateWindow(a6)    activate the window
  763.     movea.l    (sp)+,a0    
  764.     bra    notinput
  765. winflip
  766.     move.l    intuit,a6        get intuition base
  767.     cmp.b    #'w',action        window to back?
  768.     bne    flipscreen        no
  769.  
  770. wtoback
  771.     lea    pause,a1        new ioreq
  772.     move.l    a5,a0            old ioreq
  773.     moveq    #IOTV_SIZE/4-1,d0
  774. copyreqw    
  775.     move.l    (a0)+,(a1)+
  776.     dbra    d0,copyreqw
  777.     lea    pause,a1
  778.     MOVE.W  #TR_ADDREQUEST,IO_COMMAND(A1) IO_COMMAND = TR_ADDREQUEST(9)
  779.     MOVE.l  #0,IO_SIZE+TV_SECS(A1)    TV_SECS = $01(01 seconds) ||dj
  780.     MOVE.L  #10000,IO_SIZE+TV_MICRO(A1)    TV_MICRO= 10 ms
  781.     movea.l    4,a6        set Exec base
  782.     JSR     DoIO(A6)    wait
  783.  
  784.     bsr    windowpointer        find where pointer is
  785.     tst.l    d0            got window?
  786.     beq    SetAndPrintTime        no
  787.     move.l    d0,a0            get window
  788.     cmp.l    backwin,d0        same window?
  789.     bne    clrswb            no
  790.  
  791.  
  792.     move.l    wtbsecsnew,d0        get seconds
  793.     sub.l    wtbsecs,d0        minus old secs
  794.     beq    addoneb            increase count
  795.     cmpi.l    #1,d0            one second difference?
  796.     bhi    clrswb            more
  797.  
  798.     move.l    wtbsecsnew+4,d0    get micros
  799.     sub.l    wtbsecs+4,d0        minus old micros
  800.     bmi    addoneb
  801.     beq    addoneb
  802. clrswb    clr.b    backswitch        set count to 0
  803.     move.l    a0,backwin        save window
  804.     move.l    wtbsecsnew,wtbsecs save
  805.     move.l    wtbsecsnew+4,wtbsecs+4 save micros
  806. addoneb    add.b    #1,backswitch
  807.     moveq    #0,d0            clear
  808.     move.b    wtbcount,d0        get count
  809.     cmp.b    backswitch,d0
  810.     bne    SetAndPrintTime            no
  811.     clr.b    backswitch
  812.     clr.l    wtbsecs
  813.     clr.l    wtbsecs+4
  814.     clr.b    frontswitch    
  815.  
  816.     move.l    wd_Flags(a0),d0        get window flags
  817.     andi.l    #BACKDROP,d0        backdrop window?
  818.     bne    SetAndPrintTime        yes - no window to back
  819.  
  820.     movea.l    intuit,a6        layers base    
  821.     jsr    WindowToBack(a6) 
  822.  
  823.     bra    SetAndPrintTime
  824.  
  825. *** Subroutine to find which window the pointer is in
  826.  
  827. windowpointer
  828.     movea.l    intuit,a6        get intuition base
  829.     movea.l    ib_FirstScreen(a6),a1    get first screen
  830.     move.l    ib_ActiveScreen(a6),d0    get Active screen
  831.     cmp.l    a1,d0            top screen active one?    
  832.     bne    winret0            no - don't look for layer
  833.     moveq    #0,d0
  834.     moveq    #0,d1
  835.     move.l    layers,a6        get layers library
  836.     lea    sc_LayerInfo(a1),a0    get layer info
  837.     move.l    a0,-(sp)    
  838.     jsr    LockLayerInfo(a6)    lock the layer info
  839.     move.w    sc_MouseX(a1),d0    get X pointer
  840.     move.w    sc_MouseY(a1),d1    get Y pointer
  841.     move.l    (sp),a0            get pointer back
  842.     jsr    WhichLayer(a6)        find active layer    
  843.     move.l    (sp)+,a0        get pointer back
  844.     move.l    d0,-(sp)        save result
  845.     jsr    UnlockLayerInfo(a6)
  846.     move.l    (sp)+,d0        
  847.     tst.l    d0            get one?
  848.     bne    findwin            yes
  849.     rts    
  850.  
  851. findwin
  852.     movea.l    intuit,a6        get intuition base
  853.     movea.l    ib_ActiveScreen(a6),a0     get active screen    
  854.  
  855.     move.l    sc_FirstWindow(a0),a1    get first window    
  856. nextlwin
  857.     cmp.l    wd_WLayer(a1),d0    right one?    
  858.     beq    inwind            yes
  859.     move.l    wd_NextWindow(a1),d1    get next window
  860.     beq.s    winret0            no more
  861.     movea.l    d1,a1    
  862.     bra    nextlwin
  863.  
  864. winret0    
  865.     moveq    #0,d0
  866.     rts
  867. inwind
  868.     move.l    d0,d1            return layer in d1
  869.     move.l    a1,d0
  870.     rts
  871.  
  872.  
  873. flipscreen
  874.     lea    pause,a1        new ioreq
  875.     move.l    a5,a0            old ioreq
  876.     moveq    #IOTV_SIZE/4-1,d0
  877. copyreq    move.l    (a0)+,(a1)+
  878.     dbra    d0,copyreq
  879.     lea    pause,a1
  880.     MOVE.W  #TR_ADDREQUEST,IO_COMMAND(A1) IO_COMMAND = TR_ADDREQUEST(9)
  881.     MOVE.l  #0,IO_SIZE+TV_SECS(A1)    TV_SECS = $01(01 seconds) ||dj
  882.     MOVE.L  #10000,IO_SIZE+TV_MICRO(A1)    TV_MICRO= 10 ms
  883.     movea.l    4,a6        set Exec base
  884.     JSR     DoIO(A6)    wait
  885.  
  886.     
  887.     movea.l    intuit,a6
  888.     moveq    #0,d0
  889.     jsr    LockIBase(a6)
  890.     move.l    d0,-(sp)
  891.     move.l    ib_FirstScreen(a6),a0     get first screen
  892. getnextscreen
  893.     move.l    sc_NextScreen(a0),d0     get next screen
  894.     beq.s    gotlastscreen
  895.     move.l    d0,a0            
  896.     bra    getnextscreen    
  897.  
  898. gotlastscreen
  899.     movea.l    a0,a2            keep    
  900.     movea.l    (sp)+,a0        get lock
  901.     jsr    UnlockIBase(a6)
  902.     movea.l    a2,a0
  903.     jsr    ScreenToFront(a6)    
  904.     movea.l    a2,a1             active screen
  905.     move.l    sc_FirstWindow(a1),d0    get screen
  906.     beq    SetAndPrintTime        no window
  907.     move.l    d0,a0
  908.     jsr    ActivateWindow(a6)    activate 1st window
  909.     bra    SetAndPrintTime
  910.  
  911. notinput move.l d3,d0        restore    
  912.     AND.L   D6,D0        ; was it the timeoutSig(D6)?
  913.     BEQ.S   isItAWindowSig    ; if it wasn't branch 
  914.     BRA     SetAndPrintTime 
  915. isItAWindowSig:
  916.     AND.L   D4,D3        ; was what woke the Wait up a windowSig(D4)?
  917.     BEQ     MainLoop    ; if not restart the main loop
  918.     ; keep doing the loop While there are window messages
  919. WhileMoreMessages:
  920.     movea.l    4,a6        set to Exec base
  921.     MOVEA.L wd_UserPort(A3),A0 A0 = window's UserPort
  922.     JSR     GetMsg(A6)    ; call GetMsg
  923.     TST.L   D0        ; D0 = message
  924.     BEQ     SetAndPrintTime    ; no more messages so see if any timer messages 
  925.     MOVEA.L D0,A1
  926.     move.l    im_Class(a1),class    save class
  927.     move.w    im_Code(a1),code1    save code
  928.     JSR     ReplyMsg(A6)     call ReplyMessage
  929.     cmpi.l    #MENUPICK,class    menu?
  930.     bne    refres        no
  931.  
  932.     bsr    menuscan    do changes
  933.  
  934.     cmpi.w    #MENUNULL,code1    item picked?
  935.     beq    refres        no
  936.     moveq    #0,d0        clear
  937.     move.w    code1,d0    get code
  938.     andi.w    #$7ff,d0    get item and menu numbers 
  939.     lsr    #5,d0        remove menu number
  940.     cmpi.w    #0,d0        item 0?
  941.     beq    donewcli    yes - open cli
  942.     cmpi.w    #15,d0        quit?
  943.     beq    ClosedWindow    yes
  944.     cmpi.w    #2,d0        colour?
  945.     bne.s    tchip        no
  946.     moveq    #0,d0        clear
  947.     move.w    code1,d0    get code again
  948.     lsr    #8,d0        get 
  949.     lsr    #3,d0            subcode
  950.     cmpi.w    #11,d0        got one?
  951.     bhi    refres        no
  952.     lea    newcol,a0    new colours
  953.     lsl    #1,d0        * 2
  954.     move.w    0(a0,d0.w),Date_Text    set new colours
  955.     move.w    0(a0,d0.w),colours    save for save    
  956.     bra    refres
  957.  
  958. tchip    cmpi.w    #1,d0        change memory display?
  959.     bne    chpri        no
  960.  
  961. ***** swap memory display  *************
  962.  
  963.     eor.b    #1,memory    set to opposite
  964.     movea.l    A3,A0        window
  965.     movea.l intuit,A6
  966.     jsr    ClearMenuStrip(a6) remove menu
  967.     lea    window,a1
  968.     cmpi.b    #memtot,memory    total memory display?
  969.     beq.s    1$        yes
  970.  
  971. ******* set up window for chip/fast memory display *********
  972.  
  973.     lea    sepmsg,a2        new message text
  974.     move.l    #itext1b,memtext    new text
  975.     move.l    #(312-184),d2    set new width
  976.     move.l    #-128,d0        move it
  977.     cmpi.w    #128,wd_LeftEdge(a3)    neg?
  978.     bcs    3$            yes
  979.     bra.s    2$
  980. 3$    moveq    #0,d0
  981.  
  982. 2$    MOVEA.L A3,A0
  983.     moveq    #0,d1        Dy    
  984.     JSR     MoveWindow(A6)    Move    
  985.  
  986.     movea.l    a3,a0    
  987.     move.l    d2,d0        Dx
  988.     moveq    #0,d1        Dy
  989.     JSR     SizeWindow(A6)    alter size
  990.  
  991.     bra    setmen
  992.  
  993. ******** set up window for total memory display
  994.  
  995. 1$    moveq    #0,d0
  996.     moveq    #0,d1
  997.  
  998.     move.l    #itext1,memtext    new text
  999.     move.l    #(184-312),d0    set new width - dx
  1000.     lea    totmsg,a2    new message text
  1001.  
  1002.     movea.l    a3,a0    
  1003.     moveq    #0,d1        Dy
  1004.     JSR     SizeWindow(A6)    alter size 
  1005.  
  1006.     MOVEA.L A3,A0
  1007.     move.l    #128,d0        Dx value
  1008.     moveq    #0,d1        Dy    
  1009.     JSR     MoveWindow(A6)    Move    
  1010.  
  1011. setmen    lea    Date_Text,a0    message structure 
  1012.     move.l    a2,it_IText(a0)    set up message address
  1013.     movea.l    a3,a0    
  1014.     lea    menu0,a1    menu structure
  1015.     jsr    SetMenuStrip(a6) attach menu
  1016.  
  1017.     bra    refres
  1018.  
  1019. chpri
  1020.  
  1021. testref    
  1022.  
  1023. testblank    
  1024.  
  1025. testpoint    
  1026.  
  1027. testmouse    
  1028.  
  1029. testsun
  1030.  
  1031. testclickf
  1032.  
  1033. testcycle
  1034.  
  1035.  
  1036. ********* save routine
  1037.  
  1038. testsave cmpi.w    #14,d0        save?    
  1039.     beq    dosave
  1040.  
  1041.     cmpi.w    #14,d0        valid?
  1042.     bls    WhileMoreMessages     yes
  1043.  
  1044.     move.b    #1,owsw
  1045.     MOVEA.L wd_RPort(A3),A0 window's RPort
  1046.     LEA     ouch,A1         silly message structure
  1047.     MOVEQ   #0,D0
  1048.     MOVEQ   #0,D1
  1049.     movea.l  intuit,A6
  1050.     JSR     PrintIText(A6)    ; call PrintIText
  1051.  
  1052.     bra    WhileMoreMessages
  1053.  
  1054.  
  1055. dosave
  1056.     moveq    #0,d0
  1057.     move.w    #CHECKED,d0
  1058.     and.w    suncheck,d0        do sun mouse?
  1059.     beq    clrsun            no
  1060.     move.b    #$ff,sunswitch
  1061.     bra    cyccheck    
  1062. clrsun
  1063.     clr.b    sunswitch
  1064. cyccheck
  1065.     move.w    #CHECKED,d0
  1066.     and.w    cyclecheck,d0        do sun mouse?
  1067.     beq    clrcycle        no
  1068.     move.b    #$ff,cycleswitch
  1069.     bra    keych
  1070. clrcycle
  1071.     clr.b    cycleswitch
  1072. keych
  1073.     move.w    #CHECKED,d0
  1074.     and.w    keycheck,d0        do sun mouse?
  1075.     beq    clrkey        no
  1076.     move.b    #$ff,keyswitch
  1077.     bra    popch
  1078. clrkey
  1079.     clr.b    keyswitch
  1080. popch
  1081.     move.w    #CHECKED,d0
  1082.     and.w    wtfcheck,d0        do sun mouse?
  1083.     beq    clrpop        no
  1084.     move.b    #$ff,popswitch
  1085.     bra    dowrite
  1086. clrpop
  1087.     clr.b    popswitch
  1088. dowrite
  1089.     LEA     dosname,A1
  1090.     MOVEQ   #0,D0        ; load version number
  1091.     MOVEA.L 4,A6        ; load exec library address
  1092.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  1093.     TST.L   D0        ok?
  1094.     beq    refres        no
  1095.     MOVE.L    D0,a6        save
  1096.  
  1097.     lea    savefile,a0    name of save string
  1098.     move.l    a0,d1        move into right reg
  1099.     move.l    #MODE_OLDFILE,d2 old file
  1100.     jsr    Open(a6)    Open
  1101.     tst.l    d0        file there?
  1102.     bne.s    1$        yes, got file handle
  1103.     lea    savefile,a0    name of save string
  1104.     move.l    a0,d1        move into right reg
  1105.     move.l    #MODE_NEWFILE,d2 new file
  1106.     jsr    Open(a6)    Open
  1107.     tst.l    d0        got one ?
  1108.     beq    refres        no
  1109. 1$    move.l    d3,-(a7)    save d3    
  1110.     move.w    wd_LeftEdge(a3),windowleft set up window position
  1111.     move.w    wd_TopEdge(a3),windowtop         "
  1112.     lea    diskbuffer,a0
  1113.     move.l    a0,d2        data
  1114.     move.l    #diskbufferl,d3    data length
  1115.     move.l    d0,d1        file handle
  1116.     move.l    d0,-(a7)    save file handle
  1117.     
  1118.     jsr    Write(a6)    write it out
  1119.     move.l    (a7)+,d1    restore file handle
  1120.     jsr    Close(a6)    close file
  1121.     MOVE.L    a6,a1        dos Library
  1122.     movea.l    4,a6        Exec base 
  1123.     jsr    CloseLibrary(A6) call CloseLibrary
  1124.     move.l    (a7)+,d3    restore d3
  1125.     bra    refres        carry on
  1126.         
  1127.  
  1128. ************** do newcli
  1129.  
  1130. ************** Open dos library
  1131.  
  1132. donewcli LEA     dosname,A1
  1133.     MOVEQ   #0,D0        ; load version number
  1134.     MOVEA.L 4,A6        ; load exec library address
  1135.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  1136.     TST.L   D0        ok?
  1137.     beq.s   refres        no
  1138.     MOVE.L    D0,a6        save
  1139.  
  1140.     move.l    d3,-(a7)    save d3    
  1141.     lea    nilname,a0    name of nil string
  1142.     move.l    a0,d1        move into right reg
  1143.     move.l    #MODE_NEWFILE,d2 new file
  1144.     jsr    Open(a6)    Open
  1145.     move.l    d0,d3        save out handle
  1146.     moveq    #0,d2        input handle
  1147.     lea    newcli,a0    newcli command string
  1148.     move.l  a0,d1
  1149.     jsr    Execute(a6)    Execute
  1150.     move.l    (a7)+,d3    restore d3
  1151. * close dos library
  1152.     MOVE.L    a6,a1        dos Library
  1153.     movea.l    4,a6        Exec base 
  1154.     jsr    CloseLibrary(A6) call CloseLibrary
  1155.     bra    SetAndPrintTime    get timer events        
  1156.                 
  1157. refres  move.b    #0,oldsecs    force refresh              
  1158.                   
  1159. ************************************
  1160.  
  1161. PrintTime:
  1162.     tst.b    owsw        ouch?    
  1163.     beq    noow        no
  1164.     clr.b    owsw        off
  1165.     bra    treturn
  1166.  
  1167. noow    tst.l    tswitch        do display
  1168.     beq    treturn        no
  1169.     cmpi.b    #memtot,memory    total memory? 
  1170.     beq.s    2$        yes
  1171.     lea    buffer2+8,a0    seconds
  1172.     bra.s    3$
  1173. 2$    lea    buffer+8,a0    seconds
  1174. 3$    move.b    oldsecs,d1
  1175.     move.l    a0,-(sp)    keep a0
  1176.     cmp.b    (a0),d1        do display?
  1177.     beq    nodisable    no
  1178.     tst.w    blanktime    off?
  1179.     beq    tespoint    yes
  1180.     tst.b    blankdone    already blank?
  1181.     bne    tespoint    yes
  1182.  
  1183.     move.w    blanktimer,d0
  1184.     cmp.w    blanktime,d0    time to blank?
  1185.     bcs    add1blank    no
  1186.     lea    newscreen,a0    
  1187.     move.l    intuit,a6
  1188.     jsr    OpenScreen(a6)
  1189.     move.l    d0,blankscreen    keep
  1190.     beq    showtime        didn't work
  1191.  
  1192.     lea     graphicsname,a1
  1193.     MOVEQ   #0,D0        ; load version number
  1194.     MOVEA.L 4,A6        ; load exec library address
  1195.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  1196.     TST.L   D0        ok?
  1197.     beq    showtime        yes
  1198.     move.l    d0,a6        graphics base
  1199.     move.l    blankscreen,a1    get screen    
  1200.     lea    sc_ViewPort(a1),a0    get viewport
  1201.     move.l    d2,-(sp)
  1202.     moveq    #0,d1            R
  1203.     moveq    #0,d2            G
  1204.     moveq    #0,d3            B
  1205.     moveq    #0,d0            Register
  1206.     jsr    SetRGB4(a6)        nice black for CL    
  1207.     movea.l    a6,A1        graphics Library
  1208.     movea.l    4,a6        exec base
  1209.     JSR    CloseLibrary(A6) call CloseLibrary    
  1210.     move.l    (sp)+,d2
  1211.     not.b    blankdone    set to blanked
  1212.  
  1213. *    move.w    #$0020,$dff000+$96    turn off sprite dma        
  1214.     tst.w    pointtime    pointer blank on?
  1215.     bne    showtime    yes
  1216.  
  1217.     bra    killpoint
  1218.  
  1219.  
  1220. add1blank 
  1221.     addq.w    #1,blanktimer    add 1
  1222.     
  1223. tespoint
  1224.     tst.w    pointtime    off?
  1225.     beq    showtime    yes
  1226.     move.w    pointtimer,d0
  1227.     cmp.w    pointtime,d0    time to blank?
  1228.     bcs    add1point    no
  1229.  
  1230. killpoint
  1231.     lea     graphicsname,a1
  1232.     MOVEQ   #0,D0        ; load version number
  1233.     MOVEA.L 4,A6        ; load exec library address
  1234.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  1235.     tst.l    d0
  1236.     beq    showtime        yes
  1237.     move.l  d0,a6        ok?
  1238.     move.l    gb_copinit(a6),a0    copper start-up
  1239.     lea    copinit_sprstrtup(a0),a1 sprite data
  1240. clrsprite
  1241.     tst.b    pointdone    pointer blank already?
  1242.     bne    checkpoint    yes
  1243.     not.b    pointdone        set switch
  1244. redopointer
  1245.     moveq    #0,d0
  1246.     move.w    2(a1),spritesave    high bytes
  1247.     move.w    6(a1),spritesave+2        get rest of address
  1248.     move.w    spriteblank,2(a1)    top    
  1249.     move.w    spriteblank+2,6(a1)            bottom
  1250.  
  1251.     movea.l    a6,A1        graphics Library
  1252.     movea.l    4,a6        exec base
  1253.     JSR    CloseLibrary(A6) call CloseLibrary    
  1254.  
  1255. *    move.w    #$0020,$dff000+$96    turn off sprite dma        
  1256.     bra    showtime
  1257. checkpoint
  1258.     move.w    2(a1),d1        high bytes
  1259.     swap    d1
  1260.     move.w    6(a1),d1        get rest of address
  1261.     cmp.l    spriteblank,d1        still my blank pointer?
  1262.     bne    redopointer
  1263.     bra    showtime    
  1264.  
  1265.  
  1266. add1point
  1267.     addq.w    #1,pointtimer
  1268.     bra    showtime
  1269.     
  1270. nodisable    
  1271.     move.l    (sp)+,a0
  1272.     cmpi.b    #memtot,memory    total memory? 
  1273.     beq.s    totmem        yes        
  1274.     move.l    oldchip,d0
  1275.     cmp.l    chipavail,d0    do display?
  1276.     bne.s    showtime2        yes
  1277.     move.l    oldfast,d0
  1278.     cmp.l    fastavail+1,d0    do display?
  1279.     beq    treturn        no
  1280.     bra.s    showtime2        do print
  1281. totmem    move.l    oldmem,d0
  1282.     cmp.l    avail+1,d0    do display?
  1283.     beq    treturn        no, return
  1284.     bra.s    showtime2
  1285. showtime
  1286.     move.l    (sp)+,a0
  1287. showtime2
  1288.     move.b    (a0),oldsecs
  1289.     move.l    avail+1,oldmem
  1290.     move.l    chipavail,oldchip    save for next test
  1291.     move.l    fastavail+1,oldfast    save for next test
  1292.     MOVEA.L wd_RPort(A3),A0 window's RPort
  1293.     LEA     Date_Text(PC),A1 Date_Text structure
  1294.     MOVEQ   #0,D0
  1295.     MOVEQ   #0,D1
  1296.     movea.l  intuit,A6
  1297.     JSR     PrintIText(A6)    ; call PrintIText
  1298.     moveq    #0,d0
  1299.     move.w    newminutes,d0
  1300.     cmp.w    oldminutes,d0    do popup?
  1301.     beq.s    nopop        no
  1302.     move.w    #CHECKED,d0
  1303.     and.w    wtfcheck,d0    do popup?
  1304.     beq    nopop        no
  1305.     move.w    newminutes,oldminutes
  1306.     movea.l    layers,a6    layers base    
  1307.     movea.l    layerinfo,a0    screen's layer info
  1308.     movea.l    layer,a1    window's layer 
  1309.  
  1310.     jsr    UpfrontLayer(a6) pop
  1311. nopop:  
  1312. treturn:
  1313.     JMP    (A4)        ; normally jumps to WhileMoreMessages
  1314.  
  1315. *****************************
  1316.  
  1317. SetAndPrintTime:
  1318.     MOVEA.L D5,A0        ; get message form timer port
  1319.     movea.l    4,a6        set Exec base
  1320.     JSR     GetMsg(A6)    ; call GetMsg
  1321.     TST.L   D0        ; D0 = message
  1322.     BEQ     MainLoop    ; no more messages so start Waiting
  1323.  
  1324. InitializeTime:
  1325.  
  1326. ************** initialize the buffer
  1327.     
  1328.     cmpi.b    #memtot,memory        display total memory?
  1329.     beq.s    1$            yes
  1330.     lea    buffer2+1,a2
  1331.     jsr    timeclear        clear buffer
  1332.     bra.s    2$
  1333. 1$    lea    buffer+1,a2        start of area to clear
  1334.     jsr    timeclear        clear buffer    
  1335.     ; set the timeRequest to wait for refresh time
  1336. 2$    MOVE.l  #0,IO_SIZE+TV_SECS(A5)    TV_SECS = $01(01 seconds) ||dj
  1337.     MOVE.L  refrate,IO_SIZE+TV_MICRO(A5)    TV_MICRO= 200 ms
  1338.     ; get the current time. It will be on the stack
  1339.     SUBQ.L  #4,A7    
  1340.     LEA     (A7),A1        ; address of micros
  1341.     SUBQ.L  #4,A7
  1342.     LEA     (A7),A0        ; address of seconds
  1343.     movea.l  intuit,A6
  1344.     JSR     CurrentTime(A6)    ; call CurrentTime
  1345.  
  1346.     MOVE.L  (A7)+,D0    ; secs
  1347.     MOVE.L  (A7)+,D1    ; micros
  1348.     move.l    d0,tswitch    save because of mach11
  1349.  
  1350.     CLR.W   -(A7)        ; push a zero word onto the stack => AM
  1351.     DIVU    #-$5740,D0    ; secs/#secs_in_12hrs
  1352.     LSR.B   #1,D0        ; test least sig. bit by shifting into C bit
  1353.     BCC.S   AM
  1354.     ; it is PM
  1355.     MOVE.W  #$C,(A7)    ; top of stack now 12 => PM
  1356. AM:
  1357.     SWAP    D0        ;"n lower half of D0 = #of secs in the half day
  1358.     MOVE.L  D0,D1        ; save D0 into D1
  1359.     MOVEQ   #0,D0        
  1360.     MOVE.W  D1,D0        ; 
  1361.     DIVU    #$3C,D0        ; #of_secs_in_half_day/60
  1362.     MOVE.W  D0,-(A7)    ; save the #of minutes*hrs in the half day
  1363.     SWAP    D0        ; D0.W = # of secs in the minute
  1364.     move.w    d0,seconds    save seconds      ||dj
  1365.  
  1366. ******** start the timer running
  1367.  
  1368.     MOVEA.L A5,A1
  1369.     movea.l    4,a6        set Exec base
  1370.     JSR     SendIO(A6)    ; call SendIO
  1371.  
  1372. *************** Find out available memory
  1373.     move.l  #1,d1          memory type =  PUBLIC
  1374.     jsr     AvailMem(A6)    ; call AvailMem
  1375.     move.l    d0,totalmemory    save all memory
  1376.     move.l  #2,d1          memory type =  PUBLIC
  1377.     jsr     AvailMem(A6)    ; call AvailMem
  1378.     move.l    d0,chipmemory    save all memory
  1379.     
  1380. *******    reformat memory
  1381.  
  1382.     cmpi.b    #memtot,memory    total memory?
  1383.     bne.s    1$        no
  1384.     lea    avail+1,a2    memory display area
  1385.     move.l    totalmemory,d0    move in total memory
  1386.     jsr     formatmem    format memory d isplay
  1387.     bra.s    2$
  1388. 1$    move.l    chipmemory,d0    move in chip memory    
  1389.     lea    chipavail,a2    
  1390.     jsr    formatmem    format memory display
  1391.     move.l    totalmemory,d0    get total
  1392.     sub.l    chipmemory,d0    get fast memory
  1393.     lea    fastavail+1,a2    fast memory
  1394.     jsr    formatmem
  1395.  
  1396. ****** figure out what time it is and load it in the buffer
  1397.  
  1398. 2$    cmpi.b    #memtot,memory    total memopry?
  1399.     bne.s    3$        no
  1400.     lea    buffer,a2
  1401.     bra.s    4$
  1402. 3$    lea    buffer2,a2
  1403. 4$    move.w    seconds,d1    get seconds
  1404.     ext.l    d1
  1405.     divu    #$a,d1         rem = ones digit; quot = tens ||dj
  1406.     add.b    d1,7(a2)    put in 10s seconds  ||dj
  1407.     swap    d1        get remainder       ||
  1408.     add.b    d1,8(a2)    put in ones seconds ||
  1409.     MOVEQ   #0,D0
  1410.     MOVE.W  (A7)+,D0    ; D0 has # of minutes*hrs in half day
  1411.     DIVU    #$3C,D0        ; divide it by 60; rem = minutes, quot = hrs
  1412.     MOVEQ   #0,D1        
  1413.     MOVE.W  (A7)+,D1    ; D1 = (0=AM), (12=PM)
  1414.     ADD.W   D0,D1        ; add quot to D1 giving # of hrs in the day
  1415.     SWAP    D0        ; get the rem = minutes
  1416.     move.w    d0,newminutes    save for popup  ||dj
  1417.     EXT.L   D0
  1418.     DIVU    #$A,D0        ; divide by 10; rem = ones digit, quot = tens digit
  1419.     ADD.B   D0,4(A2)    ; add tens digit to buffer[4]
  1420.     SWAP    D0
  1421.     ADD.B   D0,5(A2)    add ones digit to buffer[5]
  1422.     cmpi.w    #12,d1        is it pm?
  1423.     bgt    movepm        yes
  1424.     blt    moveam
  1425.     move.b    #'P',ampm1    set to pm since it's 12
  1426.     move.b    #'P',ampm2    set to pm since it's 12
  1427.     bra.s    dohours    
  1428. moveam    move.b    #'A',ampm1    set to am
  1429.     move.b    #'A',ampm2    set to am
  1430.     bra.s    dohours
  1431. movepm    move.b    #'P',ampm1    set to pm
  1432.     move.b    #'P',ampm2    set to pm
  1433.     subi.w    #12,d1        make it < 12
  1434. dohours DIVU    #$A,D1        divide hours by 10; rem = ones digit, quot = tens digit
  1435.     ADD.B   D1,1(A2)     add tens digit to buffer[1]
  1436.     SWAP    D1
  1437.     ADD.B   D1,2(A2)    add ones digit to buffer[2]
  1438.     cmpi.b    #'0',1(a2)    1st digit zero?    
  1439.     bne.s    1$        no - carry on
  1440.     cmpi.b    #'0',2(a2)    2nd digit zero?    
  1441.     bne.s    2$        no 
  1442.     move.b    #'1',1(a2)    set to 12 am
  1443.     move.b    #'2',2(a2)       "
  1444.     bra.s    1$
  1445. 2$    move.b    #' ',1(a2)    blank 1st digit    
  1446. 1$    BRA.L   PrintTime    ; PrintTime will return
  1447.  
  1448. *********************************************************
  1449. *                            *
  1450. *  Input handler                    *
  1451. *                            *
  1452. *********************************************************
  1453.  
  1454. intcode    movem.l    a0-a6/d1-d7,-(A7)    save
  1455.  
  1456. nextevent
  1457.     cmp.b    #IECLASS_TIMER,ie_Class(a0)  ignore timer 
  1458.     beq    intdone        
  1459.     bra    noinsave
  1460.  
  1461. * save to inspect
  1462.  
  1463.     move.l    #ie_SIZEOF/4-1,d0
  1464.     lea    event,a1
  1465. mevent    move.l    (a0)+,(a1)+    move
  1466.     dbra    d0,mevent
  1467.  
  1468. noinsave
  1469.     cmp.b    #IECLASS_RAWKEY,ie_Class(a0)      got a key? 
  1470.     bne    notkey            
  1471.  
  1472.     cmpi.w    #$64,ie_Code(a0)        is it L-alt?
  1473.     bne    laltup                no
  1474.     cmpi.w    #IEQUALIFIER_RELATIVEMOUSE+IEQUALIFIER_LCOMMAND,ie_Qualifier(a0)
  1475.     beq    seti
  1476.     tst.b    lamiga                L-A down?
  1477.     beq    setlalt                no
  1478. seti
  1479.     move.b    #$ff,lsw            set switch left
  1480. setlalt
  1481.     move.b    #$ff,lalt            yes
  1482.     bra    blanktests
  1483. laltup
  1484.     cmpi.w    #$64+IECODE_UP_PREFIX,ie_Code(a0)    L-alt-up?
  1485.     bne    latest                no
  1486.     move.b    #0,lalt                reset
  1487.     move.b    #0,lsw                reset
  1488.     bra    blanktests
  1489. latest
  1490.     cmpi.w    #$66,ie_Code(a0)        is it L-A?
  1491.     bne    amiup                no
  1492.     move.b    #$ff,lamiga            set
  1493.     tst.b    lalt                L-alt down?
  1494.     beq    blanktests            no
  1495.     move.b    #$ff,lsw                set switch    
  1496. amiup
  1497.     cmpi.w    #$66+IECODE_UP_PREFIX,ie_Code(a0)    L-ami-up?
  1498.     bne    mtest                no
  1499.     clr.b    lamiga    
  1500.  
  1501. mtest
  1502.     cmpi.w    #$37,ie_Code(a0)        is it m?
  1503.     bne    testesc            no
  1504.     cmpi.w    #IEQUALIFIER_RELATIVEMOUSE+IEQUALIFIER_LCOMMAND,ie_Qualifier(a0)
  1505.     bne    testkeysw
  1506.     moveq    #0,d0
  1507.     move.w    #CHECKED,d0
  1508.     and.w    cyclecheck,d0        do screen cycle?
  1509.     beq    testkeysw        no
  1510.     move.b    #IECLASS_NULL,ie_Class(a0) remove the m
  1511.     bra    doscreen
  1512.  
  1513. testesc
  1514.     cmpi.w    #$45,ie_Code(a0)        is it ESC?
  1515.     bne    testkeysw            no
  1516.     cmpi.w    #IEQUALIFIER_RELATIVEMOUSE+IEQUALIFIER_LCOMMAND,ie_Qualifier(a0)
  1517.     bne    testkeysw
  1518.     move.b    #'n',action        set action to newcli
  1519.     move.b    #IECLASS_NULL,ie_Class(a0)    remove
  1520.     bra    signaltask
  1521.  
  1522. testkeysw
  1523.     moveq    #0,d0
  1524.     move.w    #CHECKED,d0
  1525.     and.w    keycheck,d0        do key to front?
  1526.     beq    blanktests        nope
  1527.     tst.b    lsw            got icon?
  1528.     bne    blanktests        maybe
  1529.     cmpi.b    #'l',mouseleft        left down ?
  1530.     beq    blanktests        yes don't do activate to avoid
  1531. *                    freeze when icon is picked up
  1532.  
  1533.     move.l    a0,-(sp)
  1534.     bsr    windowpointer        find where pointer is
  1535.     move.l    d0,a0            window
  1536.     move.l    intuit,a6
  1537.     movea.l    ib_ActiveWindow(a6),a1     get active window    
  1538.     cmp.l    a1,d0            already active?
  1539.     beq    resa0        yes
  1540.  
  1541.     jsr    ActivateWindow(a6)
  1542. resa0    move.l    (sp)+,a0
  1543.  
  1544.     bra    blanktests
  1545.     
  1546. notkey    
  1547.     cmp.b    #IECLASS_RAWMOUSE,ie_Class(a0)  mouse event? 
  1548.     bne    blanktests        no 
  1549.     moveq    #0,d0
  1550.     move.w    #CHECKED,d0
  1551.     and.w    suncheck,d0        do sun mouse?
  1552.     beq    speedtest        no
  1553.  
  1554.     cmpi.w    #IECODE_NOBUTTON,ie_Code(a0) mouse button pressed?
  1555.     bne    speedtest        yes
  1556.     cmpi.b    #'l',mouseleft        left down ?
  1557.     beq    speedtest        yes
  1558.  
  1559.     move.b    #'f',action    set up for sun mouse cycle
  1560.     move.l    insig,d0    we want to send this signal
  1561.     movea.l    task,a1        to this task
  1562.     move.l    4,a6        exec base
  1563.     move.l    a0,-(sp)    save
  1564.     jsr    Signal(a6)    so it wakes up
  1565.     movea.l    (sp)+,a0    restore
  1566.      
  1567. speedtest
  1568.     move.l    intuit,a6        get intuition base
  1569.     move.l    ib_ActiveScreen(a6),a1    get Active screen
  1570.     cmpi.w    #9,sc_MouseY(a1)    is Y pointer in menu area?
  1571.     bhi    notmen            no    
  1572.     cmpi.b    #'r',mouseright        right mouse button down?
  1573.     bne    notmen            no
  1574.     move.b    #$ff,menuswitch        set menuswitch
  1575. notmen
  1576.     moveq    #0,d0
  1577.     tst.b    mousespeed        no acceleration?
  1578.     beq    buttontest        no
  1579.     moveq    #0,d1            
  1580.     move.b    mousespeed,d1        get mouse speed
  1581.     add.w    #4,d1            get multiplyer
  1582.     moveq    #0,d0
  1583.     move.w    ie_X(a0),d0        get value
  1584. incx    cmp.w    #1,d0            is it 1
  1585.     beq.s    doynow            yes - leave it alone
  1586.     cmp.w    #-1,d0            is it 1
  1587.     beq.s    doynow            yes - leave it alone
  1588.     muls    d1,d0            calculate new relative mouse
  1589.     divs    #4,d0            
  1590.     move.w    d0,ie_X(a0)        put back
  1591. doynow    moveq    #0,d0
  1592.     move.w    ie_Y(a0),d0        get value
  1593. incy    cmp.w    #1,d0            is it 1?
  1594.     beq.s    buttontest        yes - leave it alone
  1595.     cmp.w    #-1,d0            is it 1?
  1596.     beq.s    buttontest        yes - leave it alone
  1597.     muls    d1,d0        
  1598.     divs    #4,d0            
  1599.     move.w    d0,ie_Y(a0)        put back
  1600.  
  1601. buttontest        
  1602.     cmpi.w    #IECODE_LBUTTON,ie_Code(a0) left mouse button?
  1603.     bne    testright        no
  1604. *
  1605. * code for window shrink
  1606. *
  1607.     tst.b    lamiga                L-A down?
  1608.     beq    1$                no
  1609.     move.b    #'d',action        delete window
  1610.     move.b    #IECLASS_NULL,ie_Class(a0) remove l button
  1611.     bra    signaltask
  1612. 1$
  1613.     cmp.b    #'r',mouseright        r set?
  1614.     beq    wsig            yes
  1615.     move.b    #'l',mouseleft        yes - set state
  1616.  
  1617.  
  1618. *** do window to front here to avoid lockup
  1619.     tst.b    lsw            got icon?
  1620.     bne    blanktests        maybe
  1621.  
  1622. dowtf    bsr    wtofront
  1623.  
  1624.     bra    blanktests
  1625.  
  1626. wtofront
  1627.         
  1628.     movem.l    a0/a1/a2/a6,-(sp)
  1629.     move.l    a0,-(sp)
  1630.     bsr    windowpointer        find where pointer is
  1631.     move.l    (sp)+,a0
  1632.     tst.l    d0            got window?
  1633.     beq    wtfend            no
  1634.     movea.l    intuit,a6        get intuition base
  1635.     move.l    d0,a2            get window
  1636.     cmp.l    frontwin,d0        same window
  1637.     bne    clrsw            no
  1638.  
  1639.     move.l    ie_TimeStamp(a0),d0    get seconds
  1640.     sub.l    wtfsecs,d0        minus old secs
  1641.     beq    addone            increase count
  1642.     cmpi.l    #1,d0            one second difference?
  1643.     bhi    clrsw            more
  1644.  
  1645.     move.l    ie_TimeStamp+4(a0),d0    get micros
  1646.     sub.l    wtfsecs+4,d0        minus old micros
  1647.     bmi    addone
  1648.     beq    addone
  1649. clrsw    clr.b    frontswitch        set count to 0
  1650.     move.l    a2,frontwin        save window
  1651.     move.l    ie_TimeStamp(a0),wtfsecs save
  1652.     move.l    ie_TimeStamp+4(a0),wtfsecs+4 save micros
  1653. addone    add.b    #1,frontswitch
  1654.     moveq    #0,d0            clear
  1655.     move.b    wtfcount,d0        get count
  1656.     cmp.b    frontswitch,d0
  1657.     bne    wtfend            no
  1658.     clr.b    frontswitch
  1659.     clr.l    wtfsecs
  1660.     clr.l    wtfsecs+4
  1661.     
  1662.     movea.l    ib_ActiveScreen(a6),a0     get active screen    
  1663.     lea    sc_LayerInfo(a0),a1    get layer info        
  1664.     cmp.l    li_top_layer(a1),d1    already on top layer?        
  1665.     beq    wtfend            yes
  1666.     movea.l    a2,a0            get window
  1667.     move.l    wd_Flags(a0),d0        get window flags
  1668.     andi.l    #BACKDROP,d0        backdrop window?
  1669.     bne    wtfend            yes - no window to front
  1670.     jsr    WindowToFront(a6)    bring it to the front
  1671. wtfend    movem.l    (sp)+,a0/a1/a2/a6
  1672.     rts
  1673.  
  1674.  
  1675. wsig
  1676.     cmpi.b    #'r',revswitch        reverse buttons?
  1677.     beq.s    dowtb            yes
  1678.     moveq    #0,d0
  1679.     move.w    #CHECKED,d0
  1680.     and.w    cyclecheck,d0        do screencycle?
  1681.     beq    blanktests        no
  1682.     tst.b    lsw            got icon?
  1683.     bne    blanktests        maybe
  1684.     tst.b    menuswitch        got a menu perhaps
  1685.     bne    blanktests        don't do screen cycle
  1686.  
  1687.     move.b    #'s',action        set action indicator
  1688.     move.w    #IECODE_RBUTTON+IECODE_UP_PREFIX,ie_Code(a0) alter to r up
  1689. * signal code
  1690.         
  1691.     move.l    insig,d0    we want to send this signal
  1692.     movea.l    task,a1        to this task
  1693.     move.l    4,a6        exec base
  1694.     move.l    a0,-(sp)    save
  1695.     jsr    Signal(a6)    so it wakes up
  1696.     movea.l    (sp)+,a0    restore
  1697.     bra    blanktests
  1698.  
  1699. dowtb
  1700.     move.l    ie_TimeStamp(a0),wtbsecsnew save
  1701.     move.l    ie_TimeStamp+4(a0),wtbsecsnew+4 save micros
  1702.  
  1703.     tst.b    lsw            got icon?
  1704.     bne    blanktests        maybe
  1705.  
  1706.     move.b    #'w',action    set up for window cycle
  1707.     move.w    #IECODE_RBUTTON+IECODE_UP_PREFIX,ie_Code(a0) alter to r up
  1708. signaltask
  1709.     move.l    insig,d0    we want to send this signal
  1710.     movea.l    task,a1        to this task
  1711.     move.l    4,a6        exec base
  1712.     move.l    a0,-(sp)    save
  1713.     jsr    Signal(a6)    so it wakes up
  1714.     movea.l    (sp)+,a0    restore
  1715.     bra    blanktests
  1716.      
  1717. testright
  1718.  
  1719.     cmpi.b    #'l',mouseleft    left down already?
  1720.     bne    testrightdown        no
  1721.     cmpi.w    #IECODE_RBUTTON,ie_Code(a0) right mouse button
  1722.     bne    testleftup        no
  1723.     move.w    #IECODE_LBUTTON+IECODE_UP_PREFIX,ie_Code(a0) change to l up
  1724.     move.b    #'r',mouseright        set state
  1725.  
  1726.  
  1727.     cmpi.b    #'r',revswitch        reverse buttons?
  1728.     beq    doscreen        yes
  1729.     move.b    #'w',action        set up for window to back
  1730.     move.l    ie_TimeStamp(a0),wtbsecsnew save
  1731.     move.l    ie_TimeStamp+4(a0),wtbsecsnew+4 save micros
  1732.     bra    signaltask
  1733. doscreen
  1734.     moveq    #0,d0
  1735.     move.w    #CHECKED,d0
  1736.     and.w    cyclecheck,d0        do screen?
  1737.     beq    blanktests        no
  1738.     tst.b    lsw            got icon?
  1739.     bne    blanktests        maybe
  1740.  
  1741.     tst.b    pointdone    pointer off?
  1742.     beq    sigscreen    no
  1743.     bsr    hellopoint    get pointer back
  1744.  
  1745. sigscreen
  1746.     tst.b    lsw        got icon?
  1747.     bne    blanktests    maybe
  1748.     tst.b    menuswitch    got a menu perhaps
  1749.     bne    blanktests    don't do screen cycle
  1750.  
  1751.     move.b    #'s',action        set action indicator
  1752.  
  1753. * signal code
  1754.         
  1755.     move.l    insig,d0    we want to send this signal
  1756.     movea.l    task,a1        to this task
  1757.     move.l    4,a6        exec base
  1758.     move.l    a0,-(sp)    save
  1759.     jsr    Signal(a6)    so it wakes up
  1760.     movea.l    (sp)+,a0    restore
  1761.     bra    blanktests
  1762.  
  1763. testleftup
  1764.     cmpi.w    #IECODE_LBUTTON+IECODE_UP_PREFIX,ie_Code(a0) l up?
  1765.     bne    testrightup    no
  1766.     move.b    #0,mouseleft    reset
  1767.     bra    blanktests
  1768.  
  1769. testrightdown
  1770.     cmpi.w    #IECODE_RBUTTON,ie_Code(a0) right mouse button?
  1771.     bne    testrupnol    no        
  1772. *
  1773. * code for window expand
  1774. *
  1775.     tst.b    lamiga                L-A down?
  1776.     beq    1$                no
  1777.     move.b    #'e',action        delete window
  1778.     move.b    #IECLASS_NULL,ie_Class(a0) remove r button
  1779.     bra    signaltask
  1780. 1$
  1781.     move.b    #'r',mouseright    set r
  1782.     move.l    intuit,a6        get intuition base
  1783.     move.l    ib_ActiveScreen(a6),a1    get Active screen
  1784.     cmpi.w    #9,sc_MouseY(a1)    is Y pointer in menu area?
  1785.     bhi    blanktests        no    
  1786.     cmpi.b    #'r',mouseright        right mouse button down?
  1787.     bne    blanktests        no
  1788.     move.b    #$ff,menuswitch        set menuswitch
  1789.  
  1790.     bra    blanktests
  1791.  
  1792. testrupnol
  1793.     cmpi.w    #IECODE_RBUTTON+IECODE_UP_PREFIX,ie_Code(a0) r up?
  1794.     bne    testrset
  1795.     clr.b    menuswitch
  1796.     move.b    #0,mouseright    reset set state
  1797.     bra    blanktests
  1798. testrset
  1799.     cmpi.b    #'r',mouseright    r set?
  1800.     bne    blanktests    no
  1801.     cmpi.w    #IECODE_LBUTTON+IECODE_UP_PREFIX,ie_Code(a0) l up?
  1802.     bne    blanktests    no    
  1803.     tst.b    menuswitch    got a menu perhaps
  1804.     bne    blanktests    don't remove l up
  1805.     moveq    #0,d0
  1806.     move.w    #CHECKED,d0
  1807.     and.w    cyclecheck,d0    do screen cycle specified?
  1808.     beq    blanktests    no don't remove l up
  1809.     move.b    #IECLASS_NULL,ie_Class(a0) remove l button up
  1810.     bra    blanktests
  1811.     
  1812. testrightup
  1813.     cmpi.b    #'r',mouseright    left been down already?
  1814.     bne    blanktests        no
  1815.     cmpi.w    #IECODE_RBUTTON+IECODE_UP_PREFIX,ie_Code(a0) r up?
  1816.     bne    blanktests        no
  1817.     move.b    #IECLASS_NULL,ie_Class(a0) remove right mouse button up
  1818.     move.b    #0,mouseright    reset r button state
  1819.     
  1820. blanktests
  1821.     tst.w    blanktime    off?
  1822.     beq    intdone        yes
  1823.     tst.b    blankdone    screen blank?
  1824.     beq    zerblank    no
  1825.  
  1826.     move.l    a0,-(sp)
  1827.     move.l    blankscreen,a0    
  1828.     beq.s    1$
  1829.     clr.b    blankdone        reset switch
  1830.  
  1831. *    move.w    #$8020,$dff000+$96    turn on sprite dma        
  1832.     move.l    intuit,a6
  1833.     jsr    CloseScreen(a6)        give back normal display
  1834. 1$    move.l    (sp)+,a0
  1835.     move.w    #0,blanktimer    zero blank timer        
  1836.     bsr    hellopoint
  1837.     bra    intdone
  1838.  
  1839. zerblank
  1840.     move.w    #0,blanktimer    zero blank timer        
  1841.     cmp.b    #IECLASS_RAWMOUSE,ie_Class(a0)  mouse event? 
  1842.     bne    intdone        no         
  1843.     
  1844.     tst.w    pointtime    off?
  1845.     beq    intdone        yes
  1846.     tst.b    pointdone    pointer off?
  1847.     beq    pointclr    no
  1848.  
  1849.     bsr    hellopoint
  1850. pointclr
  1851.     move.w    #0,pointtimer        zero pointer time
  1852.     bra    intdone
  1853.  
  1854. hellopoint
  1855.     clr.b    pointdone
  1856.     move.l    a0,-(sp)
  1857.     lea     graphicsname,a1
  1858.     MOVEQ   #0,D0        ; load version number
  1859.     MOVEA.L 4,A6        ; load exec library address
  1860.     JSR     OpenLibrary(A6)    ; call OpenLibrary
  1861.     tst.l    d0
  1862.     beq    poiblank        yes
  1863.     move.l  d0,a6        ok?
  1864.     move.l    gb_copinit(a6),a0    copper start-up
  1865.     lea    copinit_sprstrtup(a0),a1 sprite data
  1866.  
  1867.     move.w    spritesave,2(a1)    top    
  1868.     move.w    spritesave+2,6(a1)    bottom    
  1869.  
  1870.     movea.l    a6,A1        graphics Library
  1871.     movea.l    4,a6        exec base
  1872.     JSR    CloseLibrary(A6) call CloseLibrary    
  1873.  
  1874.  
  1875. *    move.w    #$8020,$dff000+$96    turn on sprite dma        
  1876. poiblank    
  1877.     move.l    (sp)+,a0        restore    
  1878. poiblankn
  1879.     move.w    #0,pointtimer        zero pointer time
  1880.     rts
  1881.  
  1882. intdone
  1883.     move.l    ie_NextEvent(a0),d0 next event
  1884.     beq.s    eventout    none
  1885.     movea.l    d0,a0
  1886.     bra    nextevent    look at next
  1887. eventout
  1888.     tst.b    eventadd    add buttons?
  1889.     beq.s    inputout    no
  1890.     clr.b    eventadd
  1891.     move.l    #mouseevents,ie_NextEvent(a0)  throw in buttons
  1892.     clr.b    eventadd    clear switch
  1893. inputout
  1894.  
  1895.  
  1896.     movem.l    (a7)+,a0-a6/d1-d7    restore
  1897.     move.l    a0,d0        pass input event to next handler
  1898.     rts
  1899.  
  1900.  
  1901. ********** subroutine to clear time buffer **********
  1902.  
  1903. timeclear move.b #'0',(a2)+        clear    
  1904.     move.b    #'0',(a2)+        clear    
  1905.     addq    #1,a2
  1906.     move.b    #'0',(a2)+        clear    
  1907.     move.b    #'0',(a2)+        clear    
  1908.     addq    #1,a2
  1909.     move.b    #'0',(a2)+        clear    
  1910.     move.b    #'0',(a2)        clear    
  1911.     rts
  1912.  
  1913. ************* subroutine to format memory display  *******
  1914.  
  1915. formatmem moveq    #0,d1        clear
  1916.     move.l    a2,-(a7)    save a2
  1917.     MOVE.L  #$30303030,(a2)    clear    
  1918.     move.b    d0,d1        save low byte 
  1919.     lsr.l    #8,d0        divide by 256 first
  1920.     divu    #3906,d0    get millions
  1921.     add.b    d0,(a2)+    put into display buffer
  1922.     swap    d0        get remainder 
  1923.     ext.l    d0
  1924.     divu    #391,d0        get hundreds of thousands
  1925.     add.b    d0,(a2)+    make it printable
  1926.     swap     d0
  1927.     ext.l    d0
  1928.     lsl.l    #8,d0        get back the 256
  1929.     divu    #10000,d0    get tens of thousands
  1930.     add.b    d0,(a2)+    make it printable
  1931.     swap     d0
  1932.     ext.l    d0
  1933.     divu    #1000,d0    get thousands
  1934.     add.b    d0,(a2)        make it printable
  1935.     moveq    #3,d0        count
  1936.     move.l    (a7)+,a2    restore
  1937. 1$    cmpi.b    #'0',(a2)        is digit zero?
  1938.     bne.s    2$        no
  1939.     move.b    #' ',(a2)+    blank it
  1940.     dbra    d0,1$        next one
  1941. 2$    rts
  1942.     
  1943.  
  1944. ******** sub-routine to scan menus for changes
  1945.  
  1946. menuscan
  1947. * look at task priority
  1948.  
  1949.     moveq    #7,d0
  1950.     moveq    #0,d1
  1951.     lea    priindex,a0        table of entries
  1952. prsearch
  1953.     move.l    (a0)+,a1        get address
  1954.     move.w    (a1),d1            get check field    
  1955.     andi.w    #CHECKED,d1        is checked?    
  1956.     bne    gotpri            yes
  1957.     dbra    d0,prsearch
  1958.     bra    prinochange
  1959. gotpri
  1960.     moveq    #7,d1
  1961.     sub.w    d0,d1            get index
  1962.     lea    newpri,a0    
  1963.     moveq    #0,d0
  1964.     move.b    0(a0,d1),d0        get new priority    
  1965.     cmp.b    priority,d0        changed?    
  1966.     beq    prinochange        no
  1967.     move.b    d0,priority    save for save routine
  1968.     movea.l    task,a1        my task
  1969.     movea.l    4,a6        exec base
  1970.     jsr    SetTaskPri(a6)    call SetTaskPri
  1971.  
  1972. prinochange
  1973.  
  1974. * look at refresh rate
  1975.                     
  1976.     moveq    #0,d1
  1977.     move.w    ref1,d1            
  1978.     moveq    #0,d0
  1979.     andi.w    #CHECKED,d1        is it checked?
  1980.     bne    gotref            yes
  1981.  
  1982.     move.w    ref2,d1            
  1983.     moveq    #4,d0
  1984.     andi.w    #CHECKED,d1        is it checked?
  1985.     bne    gotref            yes
  1986.  
  1987.     move.w    ref3,d1            
  1988.     moveq    #8,d0
  1989.     andi.w    #CHECKED,d1        is it checked?
  1990.     bne    gotref            yes
  1991.  
  1992.     moveq    #12,d0
  1993. gotref
  1994.     
  1995.     lea    newref,a0        refresh table
  1996.     move.l    0(a0,d0),d1
  1997.     cmp.l    refrate,d1        new refresh rate?
  1998.     beq    norefchange
  1999.     move.l    d1,refrate
  2000. norefchange
  2001.  
  2002. * look at window to front
  2003.  
  2004.     moveq    #3,d0
  2005.     moveq    #0,d1
  2006.     lea    frontcheckr,a0        table of entries
  2007. frsearch
  2008.     move.l    (a0)+,a1        get address
  2009.     move.w    (a1),d1            get check field    
  2010.     andi.w    #CHECKED,d1        is checked?    
  2011.     bne    gotwtf            yes
  2012.     dbra    d0,frsearch
  2013.     bra    wtfnochange
  2014. gotwtf
  2015.     moveq    #3,d1
  2016.     sub.w    d0,d1            get index
  2017.     cmp.b    wtfcount,d1        changed?    
  2018.     beq    wtfnochange        no
  2019.     move.b    d1,wtfcount        save 
  2020.  
  2021. wtfnochange
  2022.  
  2023.  
  2024. * look at window to back
  2025.  
  2026.     moveq    #3,d0
  2027.     moveq    #0,d1
  2028.     lea    backcheckr,a0        table of entries
  2029. basearch
  2030.     move.l    (a0)+,a1        get address
  2031.     move.w    (a1),d1            get check field    
  2032.     andi.w    #CHECKED,d1        is checked?    
  2033.     bne    gotwtb            yes
  2034.     dbra    d0,basearch
  2035.     bra    wtbnochange
  2036. gotwtb
  2037.     moveq    #3,d1
  2038.     sub.w    d0,d1            get index
  2039.     cmp.b    wtbcount,d1        changed?    
  2040.     beq    wtbnochange        no
  2041.     move.b    d1,wtbcount        save 
  2042.  
  2043. wtbnochange
  2044.  
  2045. * look at screen blank
  2046.  
  2047.  
  2048.     moveq    #5,d0
  2049.     moveq    #0,d1
  2050.     lea    blankcheckr,a0        table of entries
  2051. blsearch
  2052.     move.l    (a0)+,a1        get address
  2053.     move.w    (a1),d1            get check field    
  2054.     andi.w    #CHECKED,d1        is checked?    
  2055.     bne    gotbla            yes
  2056.     dbra    d0,blsearch
  2057.     bra    blanknochange
  2058. gotbla
  2059.     moveq    #5,d1
  2060.     sub.w    d0,d1            get index
  2061.     lsl.l    #1,d1
  2062.     lea    newblank,a0    
  2063.     move.w    0(a0,d1),d0        get new blank time    
  2064.     cmp.w    blanktime,d0        changed?    
  2065.     beq    blanknochange        no
  2066.                     
  2067.     move.w    d0,blanktime new screen blank time
  2068.     clr.w    blanktimer    start new interval
  2069. blanknochange
  2070.  
  2071. * look at pointer blank
  2072.  
  2073.     moveq    #5,d0
  2074.     moveq    #0,d1
  2075.     lea    pointcheckr,a0        table of entries
  2076. posearch
  2077.     move.l    (a0)+,a1        get address
  2078.     move.w    (a1),d1            get check field    
  2079.     andi.w    #CHECKED,d1        is checked?    
  2080.     bne    gotpoi            yes
  2081.     dbra    d0,posearch
  2082.     bra    pointnochange
  2083. gotpoi
  2084.     moveq    #5,d1
  2085.     sub.w    d0,d1            get index
  2086.     lsl.l    #1,d1
  2087.     lea    newpoint,a0    
  2088.     move.w    0(a0,d1),d0        get new blank time    
  2089.     cmp.w    pointtime,d0        changed?    
  2090.     beq    pointnochange        no
  2091.                     
  2092.     move.w    d0,pointtime new screen blank time
  2093.     clr.w    pointtimer    start new interval
  2094. pointnochange
  2095.  
  2096. * look at mouse speed
  2097.  
  2098.     moveq    #5,d0
  2099.     moveq    #0,d1
  2100.     lea    mousecheck,a0        table of entries
  2101. mosearch
  2102.     move.l    (a0)+,a1        get address
  2103.     move.w    (a1),d1            get check field    
  2104.     andi.w    #CHECKED,d1        is checked?    
  2105.     bne    gotmou            yes
  2106.     dbra    d0,mosearch
  2107.     bra    mousenochange
  2108. gotmou
  2109.     moveq    #5,d1
  2110.     sub.w    d0,d1            get index
  2111.     lea    newmouse,a0    
  2112.     move.b    0(a0,d1),d0        get new blank time    
  2113.     cmp.b    mousespeed,d0        changed?    
  2114.     beq    mousenochange        no
  2115.                     
  2116.     move.b    d0,mousespeed         new mouse speed
  2117. mousenochange
  2118.  
  2119.     rts
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125. ***************************************************
  2126. ****************** window structure **********************
  2127.  
  2128.  
  2129.  
  2130. window    dc.w      343        left edge
  2131.     dc.w    1        top edge        
  2132.     dc.w    184        width
  2133.     dc.w    7        Height
  2134.     dc.b    0        detail pen
  2135.     dc.b    1        block pen
  2136.     dc.l    ACTIVEWINDOW+INACTIVEWINDOW+MOUSEBUTTONS+MENUPICK  IDCMPflags 
  2137.     dc.l    WINDOWDRAG+NOCAREREFRESH+BORDERLESS flags 
  2138.     dc.l    0        first gadget
  2139.     dc.l    0        check mark
  2140.     dc.l    0        title
  2141.     dc.l    0        screen
  2142.     dc.l    0        bit map
  2143.     dc.w    0        minimum width
  2144.     dc.w    0        minimum height
  2145.     dc.w    0        max width
  2146.     dc.w    0        max height
  2147.     dc.w    1        workbench
  2148.  
  2149.  
  2150. ******************** menu structures  ********************
  2151.  
  2152.  
  2153. menu0    dc.l    0        next menu
  2154.     dc.w    50        left
  2155.     dc.w    0        top
  2156.     dc.w    80        width
  2157.     dc.w    0        height
  2158.     dc.w    MENUENABLED    flags
  2159.     dc.l    menu0name    name
  2160.     dc.l    menuitem0    1st item
  2161.     dc.w    0,0,0,0        internal
  2162.  
  2163. mendep    equ    11        menu depth
  2164. mainw    equ    130
  2165. menuitem0 dc.l    menuitem1        next menu item    
  2166.     dc.w    0        left
  2167.     dc.w    0        top
  2168.     dc.w    mainw        width
  2169.     dc.w    mendep        height
  2170.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2171.     dc.l    0        mutual exclude
  2172.     dc.l    itemname0    item fill
  2173.     dc.l    0        select fill
  2174.     dc.b    'n'        command
  2175.     dc.l    0        sub item
  2176.     dc.w    0        next select
  2177.  
  2178.     cnop    0,2        align
  2179.     
  2180. itemname0 dc.b    0        front pen    
  2181.     dc.b    1        back pen
  2182.     dc.b    RP_JAM1        draw mode
  2183.     dc.w    2        left 
  2184.     dc.w    2        top
  2185.     dc.l    0        font
  2186.     dc.l    itext0        text
  2187.     dc.l    0        next text
  2188.  
  2189. itext0    dc.b    'NewCLI        ',0
  2190.     
  2191. menuitem1 dc.l    menuitem2    next menu item    
  2192.     dc.w    0        left
  2193.     dc.w    mendep        top
  2194.     dc.w    mainw        width
  2195.     dc.w    mendep        height
  2196.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2197.     dc.l    0        mutual exclude
  2198.     dc.l    itemname1    item fill
  2199.     dc.l    0        select fill
  2200.     dc.b    'd'        command
  2201.     dc.l    0        sub item
  2202.     dc.w    0        next select
  2203.  
  2204.     cnop    0,2        align
  2205.     
  2206. itemname1 dc.b    0        front pen    
  2207.     dc.b    1        back pen
  2208.     dc.b    RP_JAM1        draw mode
  2209.     dc.w    2        left 
  2210.     dc.w    2        top
  2211.     dc.l    0        Nfont
  2212. memtext    dc.l    itext1        text
  2213.     dc.l    0        next text
  2214.  
  2215. itext1    dc.b    'Chip/Fast    ',0
  2216. itext1b    dc.b    'Total Memory ',0    
  2217. menuitem2 dc.l    menuitem3        next menu item    
  2218.     dc.w    0        left
  2219.     dc.w    mendep*2    top
  2220.     dc.w    mainw        width
  2221.     dc.w    mendep        height
  2222.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2223.     dc.l    0        mutual exclude
  2224.     dc.l    itemname2    item fill
  2225.     dc.l    0        select fill
  2226.     dc.b    0        command
  2227.     dc.l    sub1        sub item
  2228.     dc.w    0        next select
  2229.  
  2230.     cnop    0,2        align
  2231.     
  2232. itemname2 dc.b    0        front pen    
  2233.     dc.b    1        back pen
  2234.     dc.b    RP_JAM1        draw mode
  2235.     dc.w    2        left 
  2236.     dc.w    2        top
  2237.     dc.l    0        font
  2238.     dc.l    itext2        text
  2239.     dc.l    0        next text
  2240.  
  2241. itext2    dc.b    'Colour        ',0
  2242.  
  2243.  
  2244.     
  2245. menuitem3 dc.l    menuitem4    next menu item    
  2246.     dc.w    0        left
  2247.     dc.w    mendep*3    top
  2248.     dc.w    mainw        width
  2249.     dc.w    mendep        height
  2250.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2251.     dc.l    0        mutual exclude
  2252.     dc.l    itemname3    item fill
  2253.     dc.l    0        select fill
  2254.     dc.b    0        command
  2255.     dc.l    subp1        sub item
  2256.     dc.w    0        next select
  2257.  
  2258.     cnop    0,2        align
  2259.     
  2260. itemname3 dc.b    0        front pen    
  2261.     dc.b    1        back pen
  2262.     dc.b    RP_JAM1        draw mode
  2263.     dc.w    2        left 
  2264.     dc.w    2        top
  2265.     dc.l    0        font
  2266.     dc.l    itext3        text
  2267.     dc.l    0        next text
  2268.  
  2269. itext3    dc.b    'Priority      ',0
  2270.  
  2271. priw    equ    24+CHECKWIDTH
  2272.  
  2273. subp1    dc.l    subp2        next menu item    
  2274.     dc.w    mainw        left
  2275.     dc.w    0        top
  2276.     dc.w    priw        width
  2277.     dc.w    mendep        height
  2278. prich1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2279.     dc.l    $fffe        mutual exclude
  2280.     dc.l    subnamep1    item fill
  2281.     dc.l    0        select fill
  2282.     dc.b    0        command
  2283.     dc.l    0        sub item
  2284.     dc.w    0        next select
  2285.  
  2286.     cnop    0,2        align
  2287.     
  2288. subnamep1 dc.b    0        front pen    
  2289.     dc.b    1        back pen
  2290.     dc.b    RP_JAM1        draw mode
  2291.     dc.w    CHECKWIDTH    left 
  2292.     dc.w    2        top
  2293.     dc.l    0        font
  2294.     dc.l    subtextp1    text
  2295.     dc.l    0        next text
  2296.  
  2297. subtextp1 dc.b    '-3 ',0
  2298.  
  2299.  
  2300. subp2    dc.l    subp3        next menu item    
  2301.     dc.w    mainw        left
  2302.     dc.w    mendep        top
  2303.     dc.w    priw        width
  2304.     dc.w    mendep        height
  2305. prich2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2306.     dc.l    $fffd        mutual exclude
  2307.     dc.l    subnamep2    item fill
  2308.     dc.l    0        select fill
  2309.     dc.b    0        command
  2310.     dc.l    0        sub item
  2311.     dc.w    0        next select
  2312.  
  2313.     cnop    0,2        align
  2314.     
  2315. subnamep2 dc.b    0        front pen    
  2316.     dc.b    1        back pen
  2317.     dc.b    RP_JAM1        draw mode
  2318.     dc.w    CHECKWIDTH    left 
  2319.     dc.w    2        top
  2320.     dc.l    0        font
  2321.     dc.l    subtextp2    text
  2322.     dc.l    0        next text
  2323.  
  2324. subtextp2 dc.b    '-2 ',0
  2325.  
  2326. subp3    dc.l    subp4        next menu item    
  2327.     dc.w    mainw        left
  2328.     dc.w    mendep*2    top
  2329.     dc.w    priw        width
  2330.     dc.w    mendep        height
  2331. prich3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2332.     dc.l    $fffb        mutual exclude
  2333.     dc.l    subnamep3    item fill
  2334.     dc.l    0        select fill
  2335.     dc.b    0        command
  2336.     dc.l    0        sub item
  2337.     dc.w    0        next select
  2338.  
  2339.     cnop    0,2        align
  2340.     
  2341. subnamep3 dc.b    0        front pen    
  2342.     dc.b    1        back pen
  2343.     dc.b    RP_JAM1        draw mode
  2344.     dc.w    CHECKWIDTH    left 
  2345.     dc.w    2        top
  2346.     dc.l    0        font
  2347.     dc.l    subtextp3    text
  2348.     dc.l    0        next text
  2349.  
  2350. subtextp3 dc.b    '-1 ',0
  2351.  
  2352.  
  2353. subp4    dc.l    subp5        next menu item    
  2354.     dc.w    mainw        left
  2355.     dc.w    mendep*3    top
  2356.     dc.w    priw        width
  2357.     dc.w    mendep        height
  2358. prich4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2359.     dc.l    $fff7        mutual exclude
  2360.     dc.l    subnamep4    item fill
  2361.     dc.l    0        select fill
  2362.     dc.b    0        command
  2363.     dc.l    0        sub item
  2364.     dc.w    0        next select
  2365.  
  2366.     cnop    0,2        align
  2367.     
  2368. subnamep4 dc.b    0        front pen    
  2369.     dc.b    1        back pen
  2370.     dc.b    RP_JAM1        draw mode
  2371.     dc.w    CHECKWIDTH    left 
  2372.     dc.w    2        top
  2373.     dc.l    0        font
  2374.     dc.l    subtextp4    text
  2375.     dc.l    0        next text
  2376.  
  2377. subtextp4 dc.b    ' 0 ',0
  2378.  
  2379.  
  2380. subp5    dc.l    subp6        next menu item    
  2381.     dc.w    mainw+priw        left
  2382.     dc.w    0        top
  2383.     dc.w    priw        width
  2384.     dc.w    mendep        height
  2385. prich5    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2386.     dc.l    $ffef        mutual exclude
  2387.     dc.l    subnamep5    item fill
  2388.     dc.l    0        select fill
  2389.     dc.b    0        command
  2390.     dc.l    0        sub item
  2391.     dc.w    0        next select
  2392.  
  2393.     cnop    0,2        align
  2394.     
  2395. subnamep5 dc.b    0        front pen    
  2396.     dc.b    1        back pen
  2397.     dc.b    RP_JAM1        draw mode
  2398.     dc.w    CHECKWIDTH    left 
  2399.     dc.w    2        top
  2400.     dc.l    0        font
  2401.     dc.l    subtextp5    text
  2402.     dc.l    0        next text
  2403.  
  2404. subtextp5 dc.b    '+1 ',0
  2405.  
  2406.  
  2407. subp6    dc.l    subp7        next menu item    
  2408.     dc.w    mainw+priw        left
  2409.     dc.w    mendep        top
  2410.     dc.w    priw        width
  2411.     dc.w    mendep        height
  2412. prich6    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2413.     dc.l    $ffdf        mutual exclude
  2414.     dc.l    subnamep6    item fill
  2415.     dc.l    0        select fill
  2416.     dc.b    0        command
  2417.     dc.l    0        sub item
  2418.     dc.w    0        next select
  2419.  
  2420.     cnop    0,2        align
  2421.     
  2422. subnamep6 dc.b    0        front pen    
  2423.     dc.b    1        back pen
  2424.     dc.b    RP_JAM1        draw mode
  2425.     dc.w    CHECKWIDTH    left 
  2426.     dc.w    2        top
  2427.     dc.l    0        font
  2428.     dc.l    subtextp6    text
  2429.     dc.l    0        next text
  2430.  
  2431. subtextp6 dc.b    '+2 ',0
  2432.  
  2433.  
  2434. subp7    dc.l    subp8        next menu item    
  2435.     dc.w    mainw+priw        left
  2436.     dc.w    mendep*2        top
  2437.     dc.w    priw        width
  2438.     dc.w    mendep        height
  2439. prich7    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2440.     dc.l    $ffbf        mutual exclude
  2441.     dc.l    subnamep7    item fill
  2442.     dc.l    0        select fill
  2443.     dc.b    0        command
  2444.     dc.l    0        sub item
  2445.     dc.w    0        next select
  2446.  
  2447.     cnop    0,2        align
  2448.     
  2449. subnamep7 dc.b    0        front pen    
  2450.     dc.b    1        back pen
  2451.     dc.b    RP_JAM1        draw mode
  2452.     dc.w    CHECKWIDTH    left 
  2453.     dc.w    2        top
  2454.     dc.l    0        font
  2455.     dc.l    subtextp7    text
  2456.     dc.l    0        next text
  2457.  
  2458. subtextp7 dc.b    '+3 ',0
  2459.  
  2460.  
  2461. subp8    dc.l    0        next menu item    
  2462.     dc.w    mainw+priw        left
  2463.     dc.w    mendep*3    top
  2464.     dc.w    priw        width
  2465.     dc.w    mendep        height
  2466. prich8    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2467.     dc.l    $ff7f        mutual exclude
  2468.     dc.l    subnamep8    item fill
  2469.     dc.l    0        select fill
  2470.     dc.b    0        command
  2471.     dc.l    0        sub item
  2472.     dc.w    0        next select
  2473.  
  2474.     cnop    0,2        align
  2475.     
  2476. subnamep8 dc.b    0        front pen    
  2477.     dc.b    1        back pen
  2478.     dc.b    RP_JAM1        draw mode
  2479.     dc.w    CHECKWIDTH    left 
  2480.     dc.w    2        top
  2481.     dc.l    0        font
  2482.     dc.l    subtextp8    text
  2483.     dc.l    0        next text
  2484.  
  2485. subtextp8 dc.b    '+4 ',0
  2486.  
  2487.  
  2488.  
  2489. colourw    equ    74
  2490.     
  2491. sub1    dc.l    sub2        next menu item    
  2492.     dc.w    mainw        left
  2493.     dc.w    0        top
  2494.     dc.w    colourw        width
  2495.     dc.w    mendep        height
  2496.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2497.     dc.l    0        mutual exclude
  2498.     dc.l    subname1    item fill
  2499.     dc.l    0        select fill
  2500.     dc.b    0        command
  2501.     dc.l    0        sub item
  2502.     dc.w    0        next select
  2503.  
  2504.     cnop    0,2        align
  2505.     
  2506. subname1 dc.b    0        front pen    
  2507.     dc.b    1        back pen
  2508.     dc.b    RP_JAM2        draw mode
  2509.     dc.w    2        left 
  2510.     dc.w    2        top
  2511.     dc.l    0        font
  2512.     dc.l    subtext1    text
  2513.     dc.l    0        next text
  2514.  
  2515. subtext1 dc.b    'Colour 1 ',0
  2516.  
  2517.     
  2518. sub2    dc.l    sub3        next menu item    
  2519.     dc.w    mainw        left
  2520.     dc.w    mendep        top
  2521.     dc.w    colourw        width
  2522.     dc.w    mendep        height
  2523.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2524.     dc.l    0        mutual exclude
  2525.     dc.l    subname2    item fill
  2526.     dc.l    0        select fill
  2527.     dc.b    0        command
  2528.     dc.l    0        sub item
  2529.     dc.w    0        next select
  2530.  
  2531.     cnop    0,2        align
  2532.     
  2533. subname2 dc.b    2        front pen    
  2534.     dc.b    1        back pen
  2535.     dc.b    RP_JAM2        draw mode
  2536.     dc.w    2        left 
  2537.     dc.w    2        top
  2538.     dc.l    0        font
  2539.     dc.l    subtext2    text
  2540.     dc.l    0        next text
  2541.  
  2542. subtext2 dc.b    'Colour 2 ',0
  2543.  
  2544.     
  2545. sub3    dc.l    sub4        next menu item    
  2546.     dc.w    mainw        left
  2547.     dc.w    mendep*2    top
  2548.     dc.w    colourw        width
  2549.     dc.w    mendep        height
  2550.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2551.     dc.l    0        mutual exclude
  2552.     dc.l    subname3    item fill
  2553.     dc.l    0        select fill
  2554.     dc.b    0        command
  2555.     dc.l    0        sub item
  2556.     dc.w    0        next select
  2557.  
  2558.     cnop    0,2        align
  2559.     
  2560. subname3 dc.b    3        front pen    
  2561.     dc.b    1        back pen
  2562.     dc.b    RP_JAM2        draw mode
  2563.     dc.w    2        left 
  2564.     dc.w    2        top
  2565.     dc.l    0        font
  2566.     dc.l    subtext3    text
  2567.     dc.l    0        next text
  2568.  
  2569. subtext3 dc.b    'Colour 3 ',0
  2570.  
  2571.     
  2572. sub4    dc.l    sub5        next menu item    
  2573.     dc.w    mainw+colourw        left
  2574.     dc.w    0        top
  2575.     dc.w    colourw        width
  2576.     dc.w    mendep        height
  2577.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2578.     dc.l    0        mutual exclude
  2579.     dc.l    subname4    item fill
  2580.     dc.l    0        select fill
  2581.     dc.b    0        command
  2582.     dc.l    0        sub item
  2583.     dc.w    0        next select
  2584.  
  2585.     cnop    0,2        align
  2586.     
  2587. subname4 dc.b    1        front pen    
  2588.     dc.b    0        back pen
  2589.     dc.b    RP_JAM2        draw mode
  2590.     dc.w    2        left 
  2591.     dc.w    2        top
  2592.     dc.l    0        font
  2593.     dc.l    subtext4    text
  2594.     dc.l    0        next text
  2595.  
  2596. subtext4 dc.b    'Colour 4 ',0
  2597.  
  2598.     
  2599. sub5    dc.l    sub6        next menu item    
  2600.     dc.w    mainw+colourw        left
  2601.     dc.w    mendep        top
  2602.     dc.w    colourw        width
  2603.     dc.w    mendep        height
  2604.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2605.     dc.l    0        mutual exclude
  2606.     dc.l    subname5    item fill
  2607.     dc.l    0        select fill
  2608.     dc.b    0        command
  2609.     dc.l    0        sub item
  2610.     dc.w    0        next select
  2611.  
  2612.     cnop    0,2        align
  2613.     
  2614. subname5 dc.b    2        front pen    
  2615.     dc.b    0        back pen
  2616.     dc.b    RP_JAM2        draw mode
  2617.     dc.w    2        left 
  2618.     dc.w    2        top
  2619.     dc.l    0        font
  2620.     dc.l    subtext5    text
  2621.     dc.l    0        next text
  2622.  
  2623. subtext5 dc.b    'Colour 5 ',0
  2624.  
  2625.     
  2626. sub6    dc.l    sub7        next menu item    
  2627.     dc.w    mainw+colourw        left
  2628.     dc.w    mendep*2    top
  2629.     dc.w    colourw        width
  2630.     dc.w    mendep        height
  2631.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2632.     dc.l    0        mutual exclude
  2633.     dc.l    subname6    item fill
  2634.     dc.l    0        select fill
  2635.     dc.b    0        command
  2636.     dc.l    0        sub item
  2637.     dc.w    0        next select
  2638.  
  2639.     cnop    0,2        align
  2640.     
  2641. subname6 dc.b    3        front pen    
  2642.     dc.b    0        back pen
  2643.     dc.b    RP_JAM2        draw mode
  2644.     dc.w    2        left 
  2645.     dc.w    2        top
  2646.     dc.l    0        font
  2647.     dc.l    subtext6    text
  2648.     dc.l    0        next text
  2649.  
  2650. subtext6 dc.b    'Colour 6 ',0
  2651.  
  2652.     
  2653. sub7    dc.l    sub8        next menu item    
  2654.     dc.w    mainw+colourw*2        left
  2655.     dc.w    0        top
  2656.     dc.w    colourw        width
  2657.     dc.w    mendep        height
  2658.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2659.     dc.l    0        mutual exclude
  2660.     dc.l    subname7    item fill
  2661.     dc.l    0        select fill
  2662.     dc.b    0        command
  2663.     dc.l    0        sub item
  2664.     dc.w    0        next select
  2665.  
  2666.     cnop    0,2        align
  2667.     
  2668. subname7 dc.b    0        front pen    
  2669.     dc.b    2        back pen
  2670.     dc.b    RP_JAM2        draw mode
  2671.     dc.w    2        left 
  2672.     dc.w    2        top
  2673.     dc.l    0        font
  2674.     dc.l    subtext7    text
  2675.     dc.l    0        next text
  2676.  
  2677. subtext7 dc.b    'Colour 7 ',0
  2678.  
  2679.     
  2680. sub8    dc.l    sub9        next menu item    
  2681.     dc.w    mainw+colourw*2        left
  2682.     dc.w    mendep        top
  2683.     dc.w    colourw        width
  2684.     dc.w    mendep        height
  2685.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2686.     dc.l    0        mutual exclude
  2687.     dc.l    subname8    item fill
  2688.     dc.l    0        select fill
  2689.     dc.b    0        command
  2690.     dc.l    0        sub item
  2691.     dc.w    0        next select
  2692.  
  2693.     cnop    0,2        align
  2694.     
  2695. subname8 dc.b    1        front pen    
  2696.     dc.b    2        back pen
  2697.     dc.b    RP_JAM2        draw mode
  2698.     dc.w    2        left 
  2699.     dc.w    2        top
  2700.     dc.l    0        font
  2701.     dc.l    subtext8    text
  2702.     dc.l    0        next text
  2703.  
  2704. subtext8 dc.b    'Colour 8 ',0
  2705.  
  2706.     
  2707. sub9    dc.l    sub10        next menu item    
  2708.     dc.w    mainw+colourw*2        left
  2709.     dc.w    mendep*2    top
  2710.     dc.w    colourw        width
  2711.     dc.w    mendep        height
  2712.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2713.     dc.l    0        mutual exclude
  2714.     dc.l    subname9    item fill
  2715.     dc.l    0        select fill
  2716.     dc.b    0        command
  2717.     dc.l    0        sub item
  2718.     dc.w    0        next select
  2719.  
  2720.     cnop    0,2        align
  2721.     
  2722. subname9 dc.b    3        front pen    
  2723.     dc.b    2        back pen
  2724.     dc.b    RP_JAM2        draw mode
  2725.     dc.w    2        left 
  2726.     dc.w    2        top
  2727.     dc.l    0        font
  2728.     dc.l    subtext9    text
  2729.     dc.l    0        next text
  2730.  
  2731. subtext9 dc.b    'Colour 9 ',0
  2732.  
  2733.     
  2734. sub10    dc.l    sub11        next menu item    
  2735.     dc.w    mainw+colourw*3        left
  2736.     dc.w    0        top
  2737.     dc.w    colourw        width
  2738.     dc.w    mendep        height
  2739.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2740.     dc.l    0        mutual exclude
  2741.     dc.l    subname10    item fill
  2742.     dc.l    0        select fill
  2743.     dc.b    0        command
  2744.     dc.l    0        sub item
  2745.     dc.w    0        next select
  2746.  
  2747.     cnop    0,2        align
  2748.     
  2749. subname10 dc.b    0        front pen    
  2750.     dc.b    3        back pen
  2751.     dc.b    RP_JAM2        draw mode
  2752.     dc.w    2        left 
  2753.     dc.w    2        top
  2754.     dc.l    0        font
  2755.     dc.l    subtext10    text
  2756.     dc.l    0        next text
  2757.  
  2758. subtext10 dc.b    'Colour 10',0
  2759.  
  2760.     
  2761. sub11    dc.l    sub12        next menu item    
  2762.     dc.w    mainw+colourw*3        left
  2763.     dc.w    mendep        top"n
  2764.     dc.w    colourw        width
  2765.     dc.w    mendep        height
  2766.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2767.     dc.l    0        mutual exclude
  2768.     dc.l    subname11    item fill
  2769.     dc.l    0        select fill
  2770.     dc.b    0        command
  2771.     dc.l    0        sub item
  2772.     dc.w    0        next select
  2773.  
  2774.     cnop    0,2        align
  2775.     
  2776. subname11 dc.b    1        front pen    
  2777.     dc.b    3        back pen
  2778.     dc.b    RP_JAM2        draw mode
  2779.     dc.w    2        left 
  2780.     dc.w    2        top
  2781.     dc.l    0        font
  2782.     dc.l    subtext11    text
  2783.     dc.l    0        next text
  2784.  
  2785. subtext11 dc.b    'Colour 11',0
  2786.  
  2787.     
  2788. sub12    dc.l    0        next menu item    
  2789.     dc.w    mainw+colourw*3        left
  2790.     dc.w    mendep*2    top
  2791.     dc.w    colourw        width
  2792.     dc.w    mendep        height
  2793.     dc.w    ITEMTEXT+ITEMENABLED+HIGHBOX    flags
  2794.     dc.l    0        mutual exclude
  2795.     dc.l    subname12    item fill
  2796.     dc.l    0            select fill
  2797.     dc.b    0        command
  2798.     dc.l    0        sub item
  2799.     dc.w    0        next select
  2800.  
  2801.     cnop    0,2        align
  2802.     
  2803. subname12 dc.b    2        front pen    
  2804.     dc.b    3        back pen
  2805.     dc.b    RP_JAM2        draw mode
  2806.     dc.w    2        left 
  2807.     dc.w    2        top
  2808.     dc.l    0        font
  2809.     dc.l    subtext12    text
  2810.     dc.l    0        next text
  2811.  
  2812. subtext12 dc.b    'Colour 12',0
  2813.     
  2814. menuitem4 dc.l    menuitem5    next menu item    
  2815.     dc.w    0        left
  2816.     dc.w    mendep*4    top    
  2817.     dc.w    mainw        width
  2818.     dc.w    mendep        height
  2819.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2820.     dc.l    0        mutual exclude
  2821.     dc.l    itemname4    item fill
  2822.     dc.l    0        select fill
  2823.     dc.b    0        command
  2824.     dc.l    subr1        sub item
  2825.     dc.w    0        next select
  2826.  
  2827.     cnop    0,2        align
  2828.     
  2829. itemname4 dc.b    0        front pen    
  2830.     dc.b    1        back pen
  2831.     dc.b    RP_JAM1        draw mode
  2832.     dc.w    2        left 
  2833.     dc.w    2        top
  2834.     dc.l    0        font
  2835.     dc.l    itext4        text
  2836.     dc.l    0        next text
  2837.  
  2838. itext4    dc.b    'Refresh      ',0
  2839. refw    equ    80+CHECKWIDTH    
  2840. subr1    dc.l    subr2        next menu item    
  2841.     dc.w    mainw        left
  2842.     dc.w    0        top
  2843.     dc.w    refw        width
  2844.     dc.w    mendep        height
  2845. ref1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2846.     dc.l    $fe        mutual exclude
  2847.     dc.l    subnamer1    item fill
  2848.     dc.l    0        select fill
  2849.     dc.b    0        command
  2850.     dc.l    0        sub item
  2851.     dc.w    0        next select
  2852.  
  2853.     cnop    0,2        align
  2854.     
  2855. subnamer1 dc.b    0        front pen    
  2856.     dc.b    1        back pen
  2857.     dc.b    RP_JAM1        draw mode
  2858.     dc.w    CHECKWIDTH    left 
  2859.     dc.w    2        top
  2860.     dc.l    0        font
  2861.     dc.l    subtextr1    text
  2862.     dc.l    0        next text
  2863.  
  2864. subtextr1 dc.b    '10 per sec',0
  2865.  
  2866.     
  2867. subr2    dc.l    subr3        next menu item    
  2868.     dc.w    mainw        left
  2869.     dc.w    mendep        top
  2870.     dc.w    refw        width
  2871.     dc.w    mendep        height
  2872. ref2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2873.     dc.l    $fd        mutual exclude
  2874.     dc.l    subnamer2    item fill
  2875.     dc.l    0        select fill
  2876.     dc.b    0        command
  2877.     dc.l    0        sub item
  2878.     dc.w    0        next select
  2879.  
  2880.     cnop    0,2        align
  2881.     
  2882. subnamer2 dc.b    0        front pen    
  2883.     dc.b    1        back pen
  2884.     dc.b    RP_JAM1        draw mode
  2885.     dc.w    CHECKWIDTH    left 
  2886.     dc.w    2        top
  2887.     dc.l    0        font
  2888.     dc.l    subtextr2    text
  2889.     dc.l    0        next text
  2890.  
  2891. subtextr2 dc.b    ' 5 per sec',0
  2892.  
  2893.     
  2894. subr3    dc.l    subr4        next menu item    
  2895.     dc.w    mainw        left
  2896.     dc.w    mendep*2    top
  2897.     dc.w    refw        width
  2898.     dc.w    mendep        height
  2899. ref3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2900.     dc.l    $fb        mutual exclude
  2901.     dc.l    subnamer3    item fill
  2902.     dc.l    0        select fill
  2903.     dc.b    0        command
  2904.     dc.l    0        sub item
  2905.     dc.w    0        next select
  2906.  
  2907.     cnop    0,2        align
  2908.     
  2909. subnamer3 dc.b    0        front pen    
  2910.     dc.b    1        back pen
  2911.     dc.b    RP_JAM1        draw mode
  2912.     dc.w    CHECKWIDTH    left 
  2913.     dc.w    2        top
  2914.     dc.l    0        font
  2915.     dc.l    subtextr3    text
  2916.     dc.l    0        next text
  2917.  
  2918. subtextr3 dc.b    ' 2 per sec',0
  2919.  
  2920.     
  2921. subr4    dc.l    0        next menu item    
  2922.     dc.w    mainw        left
  2923.     dc.w    mendep*3    top
  2924.     dc.w    refw        width
  2925.     dc.w    mendep        height
  2926. ref4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT flags
  2927.     dc.l    $f7        mutual exclude
  2928.     dc.l    subnamer4    item fill
  2929.     dc.l    0        select fill
  2930.     dc.b    0        command
  2931.     dc.l    0        sub item
  2932.     dc.w    0        next select
  2933.  
  2934.     cnop    0,2        align
  2935.     
  2936. subnamer4 dc.b    0        front pen    
  2937.     dc.b    1        back pen
  2938.     dc.b    RP_JAM1        draw mode
  2939.     dc.w    CHECKWIDTH    left 
  2940.     dc.w    2        top
  2941.     dc.l    0        font
  2942.     dc.l    subtextr4    text
  2943.     dc.l    0        next text
  2944.  
  2945. subtextr4 dc.b    ' 1 per sec',0
  2946.  
  2947. menuitem5 dc.l    menuitem6        next menu item    
  2948.     dc.w    0        left
  2949.     dc.w    mendep*5    top
  2950.     dc.w    mainw        width
  2951.     dc.w    mendep        height
  2952.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  2953.     dc.l    0        mutual exclude
  2954.     dc.l    itemname5    item fill
  2955.     dc.l    0        select fill
  2956.     dc.b    0        command
  2957.     dc.l    subb1        sub item
  2958.     dc.w    0        next select
  2959.  
  2960.     cnop    0,2        align
  2961.     
  2962. itemname5 dc.b    0        front pen    
  2963.     dc.b    1        back pen
  2964.     dc.b    RP_JAM1        draw mode
  2965.     dc.w    2        left 
  2966.     dc.w    2        top
  2967.     dc.l    0        font
  2968.     dc.l    itext5        text
  2969.     dc.l    0        next text
  2970.  
  2971. itext5 dc.b    'Blank Screen  ',0
  2972.  
  2973. blaw    equ    32+CHECKWIDTH
  2974.  
  2975. subb1    dc.l    subb2        next menu item    
  2976.     dc.w    mainw        left
  2977.     dc.w    0        top
  2978.     dc.w    blaw        width
  2979.     dc.w    mendep        height
  2980. blach1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  2981.     dc.l    $fffe        mutual exclude
  2982.     dc.l    subnameb1    item fill
  2983.     dc.l    0        select fill
  2984.     dc.b    0        command
  2985.     dc.l    0        sub item
  2986.     dc.w    0        next select
  2987.  
  2988.     cnop    0,2        align
  2989.     
  2990. subnameb1 dc.b    0        front pen    
  2991.     dc.b    1        back pen
  2992.     dc.b    RP_JAM1        draw mode
  2993.     dc.w    CHECKWIDTH    left 
  2994.     dc.w    2        top
  2995.     dc.l    0        font
  2996.     dc.l    subtextb1    text
  2997.     dc.l    0        next text
  2998.  
  2999. subtextb1 dc.b    'OFF ',0
  3000.  
  3001.  
  3002. subb2    dc.l    subb3        next menu item    
  3003.     dc.w    mainw        left
  3004.     dc.w    mendep        top
  3005.     dc.w    blaw        width
  3006.     dc.w    mendep        height
  3007. blach2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3008.     dc.l    $fffd        mutual exclude
  3009.     dc.l    subnameb2    item fill
  3010.     dc.l    0        select fill
  3011.     dc.b    0        command
  3012.     dc.l    0        sub item
  3013.     dc.w    0        next select
  3014.  
  3015.     cnop    0,2        align
  3016.     
  3017. subnameb2 dc.b    0        front pen    
  3018.     dc.b    1        back pen
  3019.     dc.b    RP_JAM1        draw mode
  3020.     dc.w    CHECKWIDTH    left 
  3021.     dc.w    2        top
  3022.     dc.l    0        font
  3023.     dc.l    subtextb2    text
  3024.     dc.l    0        next text
  3025.  
  3026. subtextb2 dc.b    ' 5 ',0
  3027.  
  3028. subb3    dc.l    subb4        next menu item    
  3029.     dc.w    mainw        left
  3030.     dc.w    mendep*2    top
  3031.     dc.w    blaw        width
  3032.     dc.w    mendep        height
  3033. blach3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3034.     dc.l    $fffb        mutual exclude
  3035.     dc.l    subnameb3    item fill
  3036.     dc.l    0        select fill
  3037.     dc.b    0        command
  3038.     dc.l    0        sub item
  3039.     dc.w    0        next select
  3040.  
  3041.     cnop    0,2        align
  3042.     
  3043. subnameb3 dc.b    0        front pen    
  3044.     dc.b    1        back pen
  3045.     dc.b    RP_JAM1        draw mode
  3046.     dc.w    CHECKWIDTH    left 
  3047.     dc.w    2        top
  3048.     dc.l    0        font
  3049.     dc.l    subtextb3    text
  3050.     dc.l    0        next text
  3051.  
  3052. subtextb3 dc.b    '10 ',0
  3053.  
  3054.  
  3055. subb4    dc.l    subb5        next menu item    
  3056.     dc.w    mainw+blaw    left
  3057.     dc.w    0        top
  3058.     dc.w    blaw        width
  3059.     dc.w    mendep        height
  3060. blach4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3061.     dc.l    $fff7        mutual exclude
  3062.     dc.l    subnameb4    item fill
  3063.     dc.l    0        select fill
  3064.     dc.b    0        command
  3065.     dc.l    0        sub item
  3066.     dc.w    0        next select
  3067.  
  3068.     cnop    0,2        align
  3069.     
  3070. subnameb4 dc.b    0        front pen    
  3071.     dc.b    1        back pen
  3072.     dc.b    RP_JAM1        draw mode
  3073.     dc.w    CHECKWIDTH    left 
  3074.     dc.w    2        top
  3075.     dc.l    0        font
  3076.     dc.l    subtextb4    text
  3077.     dc.l    0        next text
  3078.  
  3079. subtextb4 dc.b    '20 ',0
  3080.  
  3081.  
  3082. subb5    dc.l    subb6        next menu item    
  3083.     dc.w    mainw+blaw    left
  3084.     dc.w    mendep        top
  3085.     dc.w    blaw        width
  3086.     dc.w    mendep        height
  3087. blach5    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3088.     dc.l    $ffef        mutual exclude
  3089.     dc.l    subnameb5    item fill
  3090.     dc.l    0        select fill
  3091.     dc.b    0        command
  3092.     dc.l    0        sub item
  3093.     dc.w    0        next select
  3094.  
  3095.     cnop    0,2        align
  3096.     
  3097. subnameb5 dc.b    0        front pen    
  3098.     dc.b    1        back pen
  3099.     dc.b    RP_JAM1        draw mode
  3100.     dc.w    CHECKWIDTH    left 
  3101.     dc.w    2        top
  3102.     dc.l    0        font
  3103.     dc.l    subtextb5    text
  3104.     dc.l    0        next text
  3105.  
  3106. subtextb5 dc.b    '30 ',0
  3107.  
  3108.  
  3109. subb6    dc.l    0        next menu item    
  3110.     dc.w    mainw+blaw    left
  3111.     dc.w    mendep*2    top
  3112.     dc.w    blaw        width
  3113.     dc.w    mendep        height
  3114. blach6    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3115.     dc.l    $ffdf        mutual exclude
  3116.     dc.l    subnameb6    item fill
  3117.     dc.l    0        select fill
  3118.     dc.b    0        command
  3119.     dc.l    0        sub item
  3120.     dc.w    0        next select
  3121.  
  3122.     cnop    0,2        align
  3123.     
  3124. subnameb6 dc.b    0        front pen    
  3125.     dc.b    1        back pen
  3126.     dc.b    RP_JAM1        draw mode
  3127.     dc.w    CHECKWIDTH    left 
  3128.     dc.w    2        top
  3129.     dc.l    0        font
  3130.     dc.l    subtextb6    text
  3131.     dc.l    0        next text
  3132.  
  3133. subtextb6 dc.b    '40 ',0
  3134.  
  3135.  
  3136.  
  3137. menuitem6 dc.l    menuitem7    next menu item    
  3138.     dc.w    0        left
  3139.     dc.w    mendep*6    top
  3140.     dc.w    mainw        width
  3141.     dc.w    mendep        height
  3142.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  3143.     dc.l    0        mutual exclude
  3144.     dc.l    itemname6    item fill
  3145.     dc.l    0        select fill
  3146.     dc.b    0        command
  3147.     dc.l    subo1        sub item
  3148.     dc.w    0        next select
  3149.  
  3150.     cnop    0,2        align
  3151.     
  3152. itemname6 dc.b    0        front pen    
  3153.     dc.b    1        back pen
  3154.     dc.b    RP_JAM1        draw mode
  3155.     dc.w    2        left 
  3156.     dc.w    2        top
  3157.     dc.l    0        font
  3158.     dc.l    itext6        text
  3159.     dc.l    0        next text
  3160.  
  3161. itext6 dc.b    'Blank Pointer  ',0
  3162.  
  3163.  
  3164. subo1    dc.l    subo2        next menu item    
  3165.     dc.w    mainw        left
  3166.     dc.w    0        top
  3167.     dc.w    blaw        width
  3168.     dc.w    mendep        height
  3169. poich1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3170.     dc.l    $fffe        mutual exclude
  3171.     dc.l    subnameo1    item fill
  3172.     dc.l    0        select fill
  3173.     dc.b    0        command
  3174.     dc.l    0        sub item
  3175.     dc.w    0        next select
  3176.  
  3177.     cnop    0,2        align
  3178.     
  3179. subnameo1 dc.b    0        front pen    
  3180.     dc.b    1        back pen
  3181.     dc.b    RP_JAM1        draw mode
  3182.     dc.w    CHECKWIDTH    left 
  3183.     dc.w    2        top
  3184.     dc.l    0        font
  3185.     dc.l    subtexto1    text
  3186.     dc.l    0        next text
  3187.  
  3188. subtexto1 dc.b    'OFF ',0
  3189.  
  3190.  
  3191. subo2    dc.l    subo3        next menu item    
  3192.     dc.w    mainw        left
  3193.     dc.w    mendep        top
  3194.     dc.w    blaw        width
  3195.     dc.w    mendep        height
  3196. poich2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3197.     dc.l    $fffd        mutual exclude
  3198.     dc.l    subnameo2    item fill
  3199.     dc.l    0        select fill
  3200.     dc.b    0        command
  3201.     dc.l    0        sub item
  3202.     dc.w    0        next select
  3203.  
  3204.     cnop    0,2        align
  3205.     
  3206. subnameo2 dc.b    0        front pen    
  3207.     dc.b    1        back pen
  3208.     dc.b    RP_JAM1        draw mode
  3209.     dc.w    CHECKWIDTH    left 
  3210.     dc.w    2        top
  3211.     dc.l    0        font
  3212.     dc.l    subtexto2    text
  3213.     dc.l    0        next text
  3214.  
  3215. subtexto2 dc.b    ' 5 ',0
  3216.  
  3217. subo3    dc.l    subo4        next menu item    
  3218.     dc.w    mainw        left
  3219.     dc.w    mendep*2    top
  3220.     dc.w    blaw        width
  3221.     dc.w    mendep        height
  3222. poich3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3223.     dc.l    $fffb        mutual exclude
  3224.     dc.l    subnameo3    item fill
  3225.     dc.l    0        select fill
  3226.     dc.b    0        command
  3227.     dc.l    0        sub item
  3228.     dc.w    0        next select
  3229.  
  3230.     cnop    0,2        align
  3231.     
  3232. subnameo3 dc.b    0        front pen    
  3233.     dc.b    1        back pen
  3234.     dc.b    RP_JAM1        draw mode
  3235.     dc.w    CHECKWIDTH    left 
  3236.     dc.w    2        top
  3237.     dc.l    0        font
  3238.     dc.l    subtexto3    text
  3239.     dc.l    0        next text
  3240.  
  3241. subtexto3 dc.b    '10 ',0
  3242.  
  3243.  
  3244. subo4    dc.l    subo5        next menu item    
  3245.     dc.w    mainw+blaw    left
  3246.     dc.w    0        top
  3247.     dc.w    blaw        width
  3248.     dc.w    mendep        height
  3249. poich4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3250.     dc.l    $fff7        mutual exclude
  3251.     dc.l    subnameo4    item fill
  3252.     dc.l    0        select fill
  3253.     dc.b    0        command
  3254.     dc.l    0        sub item
  3255.     dc.w    0        next select
  3256.  
  3257.     cnop    0,2        align
  3258.     
  3259. subnameo4 dc.b    0        front pen    
  3260.     dc.b    1        back pen
  3261.     dc.b    RP_JAM1        draw mode
  3262.     dc.w    CHECKWIDTH    left 
  3263.     dc.w    2        top
  3264.     dc.l    0        font
  3265.     dc.l    subtexto4    text
  3266.     dc.l    0        next text
  3267.  
  3268. subtexto4 dc.b    '20 ',0
  3269.  
  3270.  
  3271. subo5    dc.l    subo6        next menu item    
  3272.     dc.w    mainw+blaw    left
  3273.     dc.w    mendep        top
  3274.     dc.w    blaw        width
  3275.     dc.w    mendep        height
  3276. poich5    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3277.     dc.l    $ffef        mutual exclude
  3278.     dc.l    subnameo5    item fill
  3279.     dc.l    0        select fill
  3280.     dc.b    0        command
  3281.     dc.l    0        sub item
  3282.     dc.w    0        next select
  3283.  
  3284.     cnop    0,2        align
  3285.     
  3286. subnameo5 dc.b    0        front pen    
  3287.     dc.b    1        back pen
  3288.     dc.b    RP_JAM1        draw mode
  3289.     dc.w    CHECKWIDTH    left 
  3290.     dc.w    2        top
  3291.     dc.l    0        font
  3292.     dc.l    subtexto5    text
  3293.     dc.l    0        next text
  3294.  
  3295. subtexto5 dc.b    '30 ',0
  3296.  
  3297.  
  3298. subo6    dc.l    0        next menu item    
  3299.     dc.w    mainw+blaw    left
  3300.     dc.w    mendep*2    top
  3301.     dc.w    blaw        width
  3302.     dc.w    mendep        height
  3303. poich6    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3304.     dc.l    $ffdf        mutual exclude
  3305.     dc.l    subnameo6    item fill
  3306.     dc.l    0        select fill
  3307.     dc.b    0        command
  3308.     dc.l    0        sub item
  3309.     dc.w    0        next select
  3310.  
  3311.     cnop    0,2        align
  3312.     
  3313. subnameo6 dc.b    0        front pen    
  3314.     dc.b    1        back pen
  3315.     dc.b    RP_JAM1        draw mode
  3316.     dc.w    CHECKWIDTH    left 
  3317.     dc.w    2        top
  3318.     dc.l    0        font
  3319.     dc.l    subtexto6    text
  3320.     dc.l    0        next text
  3321.  
  3322. subtexto6 dc.b    '40 ',0
  3323.  
  3324.  
  3325.  
  3326. menuitem7 dc.l    menuitem8    next menu item    
  3327.     dc.w    0        left
  3328.     dc.w    mendep*7    top
  3329.     dc.w    mainw        width
  3330.     dc.w    mendep        height
  3331.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  3332.     dc.l    0        mutual exclude
  3333.     dc.l    itemname7    item fill
  3334.     dc.l    0        select fill
  3335.     dc.b    0        command
  3336.     dc.l    subm1        sub item
  3337.     dc.w    0        next select
  3338.  
  3339.     cnop    0,2        align
  3340.     
  3341. itemname7 dc.b    0        front pen    
  3342.     dc.b    1        back pen
  3343.     dc.b    RP_JAM1        draw mode
  3344.     dc.w    2        left 
  3345.     dc.w    2        top
  3346.     dc.l    0        font
  3347.     dc.l    itext7        text
  3348.     dc.l    0        next text
  3349.  
  3350. itext7 dc.b    'Mouse Speed   ',0
  3351.  
  3352.  
  3353. subm1    dc.l    subm2        next menu item    
  3354.     dc.w    mainw        left
  3355.     dc.w    0        top
  3356.     dc.w    blaw        width
  3357.     dc.w    mendep        height
  3358. mouch1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3359.     dc.l    $fffe        mutual exclude
  3360.     dc.l    subnamem1    item fill
  3361.     dc.l    0        select fill
  3362.     dc.b    0        command
  3363.     dc.l    0        sub item
  3364.     dc.w    0        next select
  3365.  
  3366.     cnop    0,2        align
  3367.     
  3368. subnamem1 dc.b    0        front pen    
  3369.     dc.b    1        back pen
  3370.     dc.b    RP_JAM1        draw mode
  3371.     dc.w    CHECKWIDTH    left 
  3372.     dc.w    2        top
  3373.     dc.l    0        font
  3374.     dc.l    subtextm1    text
  3375.     dc.l    0        next text
  3376.  
  3377. subtextm1 dc.b    '1   ',0
  3378.  
  3379.  
  3380. subm2    dc.l    subm3        next menu item    
  3381.     dc.w    mainw        left
  3382.     dc.w    mendep        top
  3383.     dc.w    blaw        width
  3384.     dc.w    mendep        height
  3385. mouch2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3386.     dc.l    $fffd        mutual exclude
  3387.     dc.l    subnamem2    item fill
  3388.     dc.l    0        select fill
  3389.     dc.b    0        command
  3390.     dc.l    0        sub item
  3391.     dc.w    0        next select
  3392.  
  3393.     cnop    0,2        align
  3394.     
  3395. subnamem2 dc.b    0        front pen    
  3396.     dc.b    1        back pen
  3397.     dc.b    RP_JAM1        draw mode
  3398.     dc.w    CHECKWIDTH    left 
  3399.     dc.w    2        top
  3400.     dc.l    0        font
  3401.     dc.l    subtextm2    text
  3402.     dc.l    0        next text
  3403.  
  3404. subtextm2 dc.b    '2  ',0
  3405.  
  3406. subm3    dc.l    subm4        next menu item    
  3407.     dc.w    mainw        left
  3408.     dc.w    mendep*2    top
  3409.     dc.w    blaw        width
  3410.     dc.w    mendep        height
  3411. mouch3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3412.     dc.l    $fffb        mutual exclude
  3413.     dc.l    subnamem3    item fill
  3414.     dc.l    0        select fill
  3415.     dc.b    0        command
  3416.     dc.l    0        sub item
  3417.     dc.w    0        next select
  3418.  
  3419.     cnop    0,2        align
  3420.     
  3421. subnamem3 dc.b    0        front pen    
  3422.     dc.b    1        back pen
  3423.     dc.b    RP_JAM1        draw mode
  3424.     dc.w    CHECKWIDTH    left 
  3425.     dc.w    2        top
  3426.     dc.l    0        font
  3427.     dc.l    subtextm3    text
  3428.     dc.l    0        next text
  3429.  
  3430. subtextm3 dc.b    '3  ',0
  3431.  
  3432.  
  3433. subm4    dc.l    subm5        next menu item    
  3434.     dc.w    mainw+blaw    left
  3435.     dc.w    0        top
  3436.     dc.w    blaw        width
  3437.     dc.w    mendep        height
  3438. mouch4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3439.     dc.l    $fff7        mutual exclude
  3440.     dc.l    subnamem4    item fill
  3441.     dc.l    0        select fill
  3442.     dc.b    0        command
  3443.     dc.l    0        sub item
  3444.     dc.w    0        next select
  3445.  
  3446.     cnop    0,2        align
  3447.     
  3448. subnamem4 dc.b    0        front pen    
  3449.     dc.b    1        back pen
  3450.     dc.b    RP_JAM1        draw mode
  3451.     dc.w    CHECKWIDTH    left 
  3452.     dc.w    2        top
  3453.     dc.l    0        font
  3454.     dc.l    subtextm4    text
  3455.     dc.l    0        next text
  3456.  
  3457. subtextm4 dc.b    '4  ',0
  3458.  
  3459.  
  3460. subm5    dc.l    subm6        next menu item    
  3461.     dc.w    mainw+blaw    left
  3462.     dc.w    mendep        top
  3463.     dc.w    blaw        width
  3464.     dc.w    mendep        height
  3465. mouch5    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3466.     dc.l    $ffef        mutual exclude
  3467.     dc.l    subnamem5    item fill
  3468.     dc.l    0        select fill
  3469.     dc.b    0        command
  3470.     dc.l    0        sub item
  3471.     dc.w    0        next select
  3472.  
  3473.     cnop    0,2        align
  3474.     
  3475. subnamem5 dc.b    0        front pen    
  3476.     dc.b    1        back pen
  3477.     dc.b    RP_JAM1        draw mode
  3478.     dc.w    CHECKWIDTH    left 
  3479.     dc.w    2        top
  3480.     dc.l    0        font
  3481.     dc.l    subtextm5    text
  3482.     dc.l    0        next text
  3483.  
  3484. subtextm5 dc.b    '5  ',0
  3485.  
  3486.  
  3487. subm6    dc.l    0        next menu item    
  3488.     dc.w    mainw+blaw    left
  3489.     dc.w    mendep*2    top
  3490.     dc.w    blaw        width
  3491.     dc.w    mendep        height
  3492. mouch6    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3493.     dc.l    $ffdf        mutual exclude
  3494.     dc.l    subnamem6    item fill
  3495.     dc.l    0        select fill
  3496.     dc.b    0        command
  3497.     dc.l    0        sub item
  3498.     dc.w    0        next select
  3499.  
  3500.     cnop    0,2        align
  3501.     
  3502. subnamem6 dc.b    0        front pen    
  3503.     dc.b    1        back pen
  3504.     dc.b    RP_JAM1        draw mode
  3505.     dc.w    CHECKWIDTH    left 
  3506.     dc.w    2        top
  3507.     dc.l    0        font
  3508.     dc.l    subtextm6    text
  3509.     dc.l    0        next text
  3510.  
  3511. subtextm6 dc.b    '6  ',0
  3512.  
  3513.  
  3514. menuitem8 dc.l    menuitem9     next menu item    
  3515.     dc.w    0        left
  3516.     dc.w    mendep*8    top
  3517.     dc.w    mainw        width
  3518.     dc.w    mendep        height
  3519. frontcheck dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3520.     dc.l    0        mutual exclude
  3521.     dc.l    itemname8    item fill
  3522.     dc.l    0        select fill
  3523.     dc.b    0        command
  3524.     dc.l    subf1        sub item
  3525.     dc.w    0        next select
  3526.  
  3527.     cnop    0,2        align
  3528.     
  3529. itemname8 dc.b    0        front pen    
  3530.     dc.b    1        back pen
  3531.     dc.b    RP_JAM1        draw mode
  3532.     dc.w    2        left 
  3533.     dc.w    2        top
  3534.     dc.l    0        font
  3535.     dc.l    itext8        text
  3536.     dc.l    0        next text
  3537.  
  3538. itext8 dc.b    'Click to Front',0
  3539.  
  3540. frontf    equ    70+CHECKWIDTH    
  3541.     
  3542. subf1    dc.l    subf2        next menu item    
  3543.     dc.w    mainw        left
  3544.     dc.w    0        top
  3545.     dc.w    frontf        width
  3546.     dc.w    mendep        height
  3547. frontf1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3548.     dc.l    $fe        mutual exclude
  3549.     dc.l    subenamef1    item fill
  3550.     dc.l    0        select fill
  3551.     dc.b    0        command
  3552.     dc.l    0        sub item
  3553.     dc.w    0        next select
  3554.  
  3555.  
  3556.     cnop    0,2        align
  3557.     
  3558. subenamef1 dc.b    0        front pen    
  3559.     dc.b    1        back pen
  3560.     dc.b    RP_JAM1        draw mode
  3561.     dc.w    CHECKWIDTH    left 
  3562.     dc.w    2        top
  3563.     dc.l    0        font
  3564.     dc.l    subtextf1    text
  3565.     dc.l    0        next text
  3566.  
  3567. subtextf1 dc.b    'OFF     ',0
  3568.  
  3569.     
  3570. subf2    dc.l    subf3        next menu item    
  3571.     dc.w    mainw        left
  3572.     dc.w    mendep        top
  3573.     dc.w    frontf        width
  3574.     dc.w    mendep        height
  3575. frontf2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3576.     dc.l    $fd        mutual exclude
  3577.     dc.l    subenamef2    item fill
  3578.     dc.l    0        select fill
  3579.     dc.b    0        command
  3580.     dc.l    0        sub item
  3581.     dc.w    0        next select
  3582.  
  3583.     cnop    0,2        align
  3584.     
  3585. subenamef2 dc.b    0        front pen    
  3586.     dc.b    1        back pen
  3587.     dc.b    RP_JAM1        draw mode
  3588.     dc.w    CHECKWIDTH    left 
  3589.     dc.w    2        top
  3590.     dc.l    0        font
  3591.     dc.l    subtextf2    text
  3592.     dc.l    0        next text
  3593.  
  3594. subtextf2 dc.b    '1 Click ',0
  3595.  
  3596.     
  3597. subf3    dc.l    subf4        next menu item    
  3598.     dc.w    mainw        left
  3599.     dc.w    mendep*2    top
  3600.     dc.w    frontf        width
  3601.     dc.w    mendep        height
  3602. frontf3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3603.     dc.l    $fb        mutual exclude
  3604.     dc.l    subenamef3    item fill
  3605.     dc.l    0        select fill
  3606.     dc.b    0        command
  3607.     dc.l    0        sub item
  3608.     dc.w    0        next select
  3609.  
  3610.     cnop    0,2        align
  3611.     
  3612. subenamef3 dc.b    0        front pen    
  3613.     dc.b    1        back pen
  3614.     dc.b    RP_JAM1        draw mode
  3615.     dc.w    CHECKWIDTH    left 
  3616.     dc.w    2        top
  3617.     dc.l    0        font
  3618.     dc.l    subtextf3    text
  3619.     dc.l    0        next text
  3620.  
  3621. subtextf3 dc.b    '2 Clicks',0
  3622.  
  3623.     
  3624. subf4    dc.l    0        next menu item    
  3625.     dc.w    mainw        left
  3626.     dc.w    mendep*3    top
  3627.     dc.w    frontf        width
  3628.     dc.w    mendep        height
  3629. frontf4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT flags
  3630.     dc.l    $f7        mutual exclude
  3631.     dc.l    subenamef4    item fill
  3632.     dc.l    0        select fill
  3633.     dc.b    0        command
  3634.     dc.l    0        sub item
  3635.     dc.w    0        next select
  3636.  
  3637.     cnop    0,2        align
  3638.     
  3639. subenamef4 dc.b    0        front pen    
  3640.     dc.b    1        back pen
  3641.     dc.b    RP_JAM1        draw mode
  3642.     dc.w    CHECKWIDTH    left 
  3643.     dc.w    2        top
  3644.     dc.l    0        font
  3645.     dc.l    subtextf4    text
  3646.     dc.l    0        next text
  3647.  
  3648. subtextf4 dc.b    '3 Clicks',0
  3649.  
  3650.  
  3651.  
  3652. menuitem9 dc.l    menuitem10     next menu item    
  3653.     dc.w    0        left
  3654.     dc.w    mendep*9    top
  3655.     dc.w    mainw        width
  3656.     dc.w    mendep        height
  3657. backcheck dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3658.     dc.l    0        mutual exclude
  3659.     dc.l    itemname9    item fill
  3660.     dc.l    0        select fill
  3661.     dc.b    0        command
  3662.     dc.l    subu1        sub item
  3663.     dc.w    0        next select
  3664.  
  3665.     cnop    0,2        align
  3666.     
  3667. itemname9 dc.b    0        front pen    
  3668.     dc.b    1        back pen
  3669.     dc.b    RP_JAM1        draw mode
  3670.     dc.w    2        left 
  3671.     dc.w    2        top
  3672.     dc.l    0        font
  3673.     dc.l    itext9        text
  3674.     dc.l    0        next text
  3675.  
  3676. itext9 dc.b    'Click to Back ',0
  3677.  
  3678.  
  3679. backf    equ    70+CHECKWIDTH    
  3680.     
  3681. subu1    dc.l    subu2        next menu item    
  3682.     dc.w    mainw        left
  3683.     dc.w    0        top
  3684.     dc.w    backf        width
  3685.     dc.w    mendep        height
  3686. backf1    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3687.     dc.l    $fe        mutual exclude
  3688.     dc.l    subenameu1    item fill
  3689.     dc.l    0        select fill
  3690.     dc.b    0        command
  3691.     dc.l    0        sub item
  3692.     dc.w    0        next select
  3693.  
  3694.  
  3695.     cnop    0,2        align
  3696.     
  3697. subenameu1 dc.b    0        front pen    
  3698.     dc.b    1        back pen
  3699.     dc.b    RP_JAM1        draw mode
  3700.     dc.w    CHECKWIDTH    left 
  3701.     dc.w    2        top
  3702.     dc.l    0        font
  3703.     dc.l    subtextu1    text
  3704.     dc.l    0        next text
  3705.  
  3706. subtextu1 dc.b    'OFF     ',0
  3707.  
  3708.     
  3709. subu2    dc.l    subu3        next menu item    
  3710.     dc.w    mainw        left
  3711.     dc.w    mendep        top
  3712.     dc.w    backf        width
  3713.     dc.w    mendep        height
  3714. backf2    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3715.     dc.l    $fd        mutual exclude
  3716.     dc.l    subenameu2    item fill
  3717.     dc.l    0        select fill
  3718.     dc.b    0        command
  3719.     dc.l    0        sub item
  3720.     dc.w    0        next select
  3721.  
  3722.     cnop    0,2        align
  3723.     
  3724. subenameu2 dc.b    0        front pen    
  3725.     dc.b    1        back pen
  3726.     dc.b    RP_JAM1        draw mode
  3727.     dc.w    CHECKWIDTH    left 
  3728.     dc.w    2        top
  3729.     dc.l    0        font
  3730.     dc.l    subtextu2    text
  3731.     dc.l    0        next text
  3732.  
  3733. subtextu2 dc.b    '1 Click ',0
  3734.  
  3735.     
  3736. subu3    dc.l    subu4        next menu item    
  3737.     dc.w    mainw        left
  3738.     dc.w    mendep*2    top
  3739.     dc.w    backf        width
  3740.     dc.w    mendep        height
  3741. backf3    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT    flags
  3742.     dc.l    $fb        mutual exclude
  3743.     dc.l    subenameu3    item fill
  3744.     dc.l    0        select fill
  3745.     dc.b    0        command
  3746.     dc.l    0        sub item
  3747.     dc.w    0        next select
  3748.  
  3749.     cnop    0,2        align
  3750.     
  3751. subenameu3 dc.b    0        front pen    
  3752.     dc.b    1        back pen
  3753.     dc.b    RP_JAM1        draw mode
  3754.     dc.w    CHECKWIDTH    left 
  3755.     dc.w    2        top
  3756.     dc.l    0        font
  3757.     dc.l    subtextu3    text
  3758.     dc.l    0        next text
  3759.  
  3760. subtextu3 dc.b    '2 Clicks',0
  3761.  
  3762.     
  3763. subu4    dc.l    0        next menu item    
  3764.     dc.w    mainw        left
  3765.     dc.w    mendep*3    top
  3766.     dc.w    backf        width
  3767.     dc.w    mendep        height
  3768. backf4    dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT flags
  3769.     dc.l    $f7        mutual exclude
  3770.     dc.l    subenameu4    item fill
  3771.     dc.l    0        select fill
  3772.     dc.b    0        command
  3773.     dc.l    0        sub item
  3774.     dc.w    0        next select
  3775.  
  3776.     cnop    0,2        align
  3777.     
  3778. subenameu4 dc.b    0        front pen    
  3779.     dc.b    1        back pen
  3780.     dc.b    RP_JAM1        draw mode
  3781.     dc.w    CHECKWIDTH    left 
  3782.     dc.w    2        top
  3783.     dc.l    0        font
  3784.     dc.l    subtextu4    text
  3785.     dc.l    0        next text
  3786.  
  3787. subtextu4 dc.b    '3 Clicks',0
  3788.  
  3789.  
  3790. menuitem10 dc.l    menuitem11    next menu item    
  3791.     dc.w    0        left
  3792.     dc.w    mendep*10    top
  3793.     dc.w    mainw        width
  3794.     dc.w    mendep        height
  3795. suncheck dc.w   ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT+MENUTOGGLE    flags
  3796.     dc.l    0        mutual exclude
  3797.     dc.l    itemname10    item fill
  3798.     dc.l    0        select fill
  3799.     dc.b    0        command
  3800.     dc.l    0        sub item
  3801.     dc.w    0        next select
  3802.  
  3803.     cnop    0,2        align
  3804.     
  3805. itemname10 dc.b    0        front pen    
  3806.     dc.b    1        back pen
  3807.     dc.b    RP_JAM1        draw mode
  3808.     dc.w    CHECKWIDTH
  3809.     dc.w    2        top
  3810.     dc.l    0        font
  3811.     dc.l    itext10        text
  3812.     dc.l    0        next text
  3813.  
  3814. itext10 dc.b    'Sun Mouse     ',0
  3815.  
  3816.  
  3817.  
  3818. menuitem11 dc.l    menuitem12    next menu item    
  3819.     dc.w    0        left
  3820.     dc.w    mendep*11    top
  3821.     dc.w    mainw        width
  3822.     dc.w    mendep        height
  3823. cyclecheck dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT+MENUTOGGLE    flags
  3824.     dc.l    0        mutual exclude
  3825.     dc.l    itemname11    item fill
  3826.     dc.l    0        select fill
  3827.     dc.b    0        command
  3828.     dc.l    0        sub item
  3829.     dc.w    0        next select
  3830.  
  3831.     cnop    0,2        align
  3832.     
  3833. itemname11 dc.b    0        front pen    
  3834.     dc.b    1        back pen
  3835.     dc.b    RP_JAM1        draw mode
  3836.     dc.w    CHECKWIDTH    left 
  3837.     dc.w    2        top
  3838.     dc.l    0        font
  3839.     dc.l    itext11        text
  3840.     dc.l    0        next text
  3841.  
  3842. itext11 dc.b    'Screen Cycle  ',0
  3843.  
  3844.  
  3845. menuitem12 dc.l    menuitem13    next menu item    
  3846.     dc.w    0        left
  3847.     dc.w    mendep*12    top
  3848.     dc.w    mainw        width
  3849.     dc.w    mendep        height
  3850. keycheck dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT+MENUTOGGLE    flags
  3851.     dc.l    0        mutual exclude
  3852.     dc.l    itemname12    item fill
  3853.     dc.l    0        select fill
  3854.     dc.b    0        command
  3855.     dc.l    0        sub item
  3856.     dc.w    0        next select
  3857.  
  3858.     cnop    0,2        align
  3859.     
  3860. itemname12 dc.b    0        front pen    
  3861.     dc.b    1        back pen
  3862.     dc.b    RP_JAM1        draw mode
  3863.     dc.w    CHECKWIDTH    left 
  3864.     dc.w    2        top
  3865.     dc.l    0        font
  3866.     dc.l    itext12        text
  3867.     dc.l    0        next text
  3868.  
  3869. itext12 dc.b    'Key Activate  ',0
  3870.  
  3871.  
  3872. menuitem13 dc.l    menuitems    next menu item    
  3873.     dc.w    0        left
  3874.     dc.w    mendep*13    top
  3875.     dc.w    mainw        width
  3876.     dc.w    mendep        height
  3877. wtfcheck dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP+CHECKIT+MENUTOGGLE    flags
  3878.     dc.l    0        mutual exclude
  3879.     dc.l    itemname13    item fill
  3880.     dc.l    0        select fill
  3881.     dc.b    0        command
  3882.     dc.l    0        sub item
  3883.     dc.w    0        next select
  3884.  
  3885.     cnop    0,2        align
  3886.     
  3887. itemname13 dc.b    0        front pen    
  3888.     dc.b    1        back pen
  3889.     dc.b    RP_JAM1        draw mode
  3890.     dc.w    CHECKWIDTH    left 
  3891.     dc.w    2        top
  3892.     dc.l    0        font
  3893.     dc.l    itext13        text
  3894.     dc.l    0        next text
  3895.  
  3896. itext13 dc.b    'Pop to Front  ',0
  3897.  
  3898.  
  3899.     
  3900. menuitems dc.l    menuitemq        next menu item    
  3901.     dc.w    0        left
  3902.     dc.w    mendep*14    top
  3903.     dc.w    mainw        width
  3904.     dc.w    mendep        height
  3905.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  3906.     dc.l    0        mutual exclude
  3907.     dc.l    itemnames    item fill
  3908.     dc.l    0        select fill
  3909.     dc.b    0        command
  3910.     dc.l    0        sub item
  3911.     dc.w    0        next select
  3912.  
  3913.     cnop    0,2        align
  3914.     
  3915. itemnames dc.b    0        front pen    
  3916.     dc.b    1        back pen
  3917.     dc.b    RP_JAM1        draw mode
  3918.     dc.w    2        left 
  3919.     dc.w    2        top
  3920.     dc.l    0        font
  3921.     dc.l    itexts        text
  3922.     dc.l    0        next text
  3923.  
  3924. itexts dc.b    'Save          ',0
  3925.  
  3926.         
  3927. menuitemq dc.l    menuitemc        next menu item    
  3928.     dc.w    0        left
  3929.     dc.w    mendep*15    top
  3930.     dc.w    mainw        width
  3931.     dc.w    mendep        height
  3932.     dc.w    ITEMTEXT+ITEMENABLED+HIGHCOMP    flags
  3933.     dc.l    0        mutual exclude
  3934.     dc.l    itemnameq    item fill
  3935.     dc.l    0        select fill
  3936.     dc.b    0        command
  3937.     dc.l    0        sub item
  3938.     dc.w    0        next select
  3939.  
  3940.     cnop    0,2        align
  3941.     
  3942. itemnameq dc.b    0        front pen    
  3943.     dc.b    1        back pen
  3944.     dc.b    RP_JAM1        draw mode
  3945.     dc.w    2        left 
  3946.     dc.w    2        top
  3947.     dc.l    0        font
  3948.     dc.l    itextq        text
  3949.     dc.l    0        next text
  3950.  
  3951. itextq    dc.b    'Quit          ',0
  3952.  
  3953.         
  3954. menuitemc dc.l    0        next menu item    
  3955.     dc.w    0        left
  3956.     dc.w    mendep*16    top
  3957.     dc.w    mainw        width
  3958.     dc.w    mendep        height
  3959.     dc.w    ITEMTEXT+ITEMENABLED+HIGHNONE    flags
  3960.     dc.l    0        mutual exclude
  3961.     dc.l    itemnamec    item fill
  3962.     dc.l    0        select fill
  3963.     dc.b    0        command
  3964.     dc.l    subcredit    sub item
  3965.     dc.w    0        next select
  3966.  
  3967.     cnop    0,2        align
  3968.     
  3969. itemnamec dc.b    0        front pen    
  3970.     dc.b    1        back pen
  3971.     dc.b    RP_JAM1        draw mode
  3972.     dc.w    2        left 
  3973.     dc.w    2        top
  3974.     dc.l    0        font
  3975.     dc.l    itextc        text
  3976.     dc.l    0        next text
  3977.  
  3978. itextc    dc.b    'Credits       ',0
  3979.     
  3980. subcredit dc.l    0        next menu item    
  3981.     dc.w    mainw        left
  3982.     dc.w    0        p
  3983.     dc.w    subcrtextl        width
  3984.     dc.w    mendep        height
  3985.     dc.w    ITEMTEXT+ITEMENABLED+HIGHNONE  flags
  3986.     dc.l    0        mutual exclude
  3987.     dc.l    subcreditm    item fill
  3988.     dc.l    0        select fill
  3989.     dc.b    0        command
  3990.     dc.l    0        sub item
  3991.     dc.w    0        next select
  3992.  
  3993.     cnop    0,2        align
  3994.     
  3995. subcreditm dc.b    0        front pen    
  3996.     dc.b    1        back pen
  3997.     dc.b    RP_JAM1        draw mode
  3998.     dc.w    2        left 
  3999.     dc.w    2        top
  4000.     dc.l    0        font
  4001.     dc.l    subcrtext    text
  4002.     dc.l    0        next text
  4003.  
  4004.  
  4005. newref    dc.l    100000,200000,500000,999999 other refresh rates
  4006. newblank dc.w    0,300,600,1200,1800,2400   screen blank time
  4007. newpoint dc.w    0,5,10,20,30,40           pointer blank time
  4008. newmouse dc.b    0,1,2,3,4,5           mouse speeds
  4009. priindex dc.l    prich1,prich2,prich3,prich4,prich5,prich6,prich7,prich8
  4010. mousecheck dc.l mouch1,mouch2,mouch3,mouch4,mouch5,mouch6
  4011. frontcheckr dc.l frontf1,frontf2,frontf3,frontf4
  4012. backcheckr dc.l backf1,backf2,backf3,backf4
  4013. blankcheckr dc.l blach1,blach2,blach3,blach4,blach5,blach6
  4014. pointcheckr dc.l poich1,poich2,poich3,poich4,poich5,poich6
  4015. ************   words  *********************************
  4016.  
  4017. seconds    dc.w    0
  4018. newminutes dc.w    0
  4019. oldminutes dc.w 0
  4020. newcol    dc.w    $0001,$0201,$0301,$0100,$0200,$0300,$0002,$0102,$0302
  4021.     dc.w    $0003,$0103,$0203
  4022.  
  4023. ************  bytes + bits and pieces **********
  4024.     cnop    0,2
  4025. layersname dc.b    'layers.library',0
  4026. subcrtext dc.b    ' David Jenkins ',$a9,' 1988 ',0
  4027. subcrtextl equ    *-subcrtext-1
  4028. menu0name dc.b    'clockdj',0
  4029. savefile dc.b    'sys:clockdj.config',0
  4030.     cnop    0,2
  4031. TimerPortName:
  4032.     DC.B    'timer',0
  4033.     cnop    0,2
  4034. TimerName:
  4035.     DC.B    'timer.device',0,0
  4036.     cnop    0,2
  4037. IntuitionName:
  4038.     DC.B    'intuition.library',0
  4039. endmsg    dc.b    0
  4040. oldsecs    dc.b    0
  4041.     cnop    0,2
  4042. dosname    dc.b    'dos.library',0
  4043.     cnop    0,2
  4044. graphicsname
  4045.     dc.b    'graphics.library',0
  4046. code1    dc.w    0
  4047. newcli    dc.b    'newcli >nil: <nil: "con:0/150/640/50/ clockdj "',0
  4048. newrest    dcb.b    81-(*-newcli),0    
  4049. nilname    dc.b    'nil:',0
  4050. memtot    equ    0
  4051. newpri    dc.b    -3,-2,-1,0,1,2,3,4
  4052. owsw    dc.b    0
  4053.         CNOP    0,2
  4054.  
  4055. inputname    dc.b    'input.device',0
  4056.         cnop    0,2
  4057. inputportname    dc.b    'input.portdj',0        
  4058.         cnop    0,2
  4059. IntName        DC.B    'input handler DJ',0
  4060.         CNOP    0,2
  4061.  
  4062.  
  4063. **********  IntuiText structures ****************
  4064.  
  4065.     cnop    0,2            align
  4066. Date_Text:
  4067.     DC.B    0,1,1,0
  4068.     DC.W    0,0
  4069.     DC.L    0,totmsg,0
  4070.  
  4071.  
  4072.     cnop    0,2            align
  4073.  
  4074. ouch    DC.B    3,0,1,0
  4075.     DC.W    0,0
  4076.     DC.L    0,ouchmsg,0
  4077.     cnop    0,2
  4078. ouchmsg    dc.b    'OUCH!',0        for Steve
  4079.  
  4080. ********* text for IntuiText   *************
  4081.  
  4082.     cnop    0,2            align avail
  4083. totmsg  dc.b    ' '
  4084. avail    dc.b    ' 0000K'
  4085.     dc.b    '  '            
  4086. buffer:
  4087.     dc.B    ' 00:00:00 '
  4088. ampm1    dc.b    'AM   ',0
  4089.  
  4090. *********************************************
  4091.  
  4092. ******** more text for IntuiText ************
  4093.  
  4094.     cnop    0,2            align avail
  4095.     dc.b    0
  4096. sepmsg  dc.b    ' '
  4097.     dc.b    ' Chip:'
  4098. chipavail dc.b    '0000K'
  4099.     dc.b    ' Fast:'    
  4100. fastavail dc.b    ' 0000K '    
  4101. buffer2:
  4102.     dc.B    ' 00:00:00 '
  4103. ampm2    dc.b    'AM   ',0
  4104.  
  4105. *********************************************
  4106.  
  4107. **** new screen for screen blanking
  4108.  
  4109. newscreen
  4110.  
  4111.     dc.w    0    ns_LeftEdge            ; initial Screen dimensions
  4112.         dc.w    0    ns_TopEdge             ; initial Screen dimensions
  4113.         dc.w    640    ns_Width               ; initial Screen dimensions
  4114.        dc.w     200    ns_Height              ; initial Screen dimensions
  4115.         dc.w    1    ns_Depth               ; initial Screen dimensions
  4116.         dc.b    0    ns_DetailPen           ; default rendering pens (for Windows too)
  4117.         dc.b    0    ns_BlockPen            ; default rendering pens (for Windows too)
  4118.         dc.w    V_HIRES    ns_ViewModes           ; display "modes" for this Screen
  4119.         dc.w    CUSTOMSCREEN+SCREENQUIET   ns_Type Screen Type specifier
  4120.        dc.l    0    ns_Font                ; default font for Screen and Windows
  4121.         dc.l    0    ns_DefaultTitle        ; Title when Window doesn't care
  4122.         dc.l    0    ns_Gadgets             ; Your own initial Screen Gadgets
  4123.  
  4124.  
  4125. mouseevents
  4126.     dc.l     0        ie_NextEvent
  4127.     dc.b    IECLASS_RAWMOUSE ie_Class
  4128.     dc.b    0        ie_SubClass
  4129.     dc.w    IECODE_RBUTTON+IECODE_UP_PREFIX    ie_Code
  4130.     dc.w    0        ie_Qualifier
  4131.     dc.w    0        ie_X
  4132.     dc.w    0        ie_Y
  4133.     dc.l    0        tv_Seconds
  4134.     dc.l    0        tv_Micros
  4135.  
  4136.  
  4137. *******  this is the save record. Keep it together!  ************
  4138. *                                    *    
  4139.     cnop    0,2                        *
  4140. diskbuffer equ     *                        *
  4141. windowleft dc.w    343                        *
  4142. windowtop dc.w    1                        *
  4143. refrate    dc.l    200000        default refresh rate        *
  4144. colours    dc.b    0,1        default colours            *
  4145. memory    dc.b    0        default total            *
  4146. priority dc.b    2                        *
  4147. pointtime    dc.w    10    default pointer blank time    *
  4148. blanktime    dc.w    600    default screen blank time     *
  4149. mousespeed    dc.b    0                    *
  4150. sunswitch    dc.b    0                    *    
  4151. wtfcount    dc.b    0                    *
  4152. wtbcount    dc.b    0                    *
  4153. cycleswitch    dc.b    0                    *
  4154. keyswitch    dc.b    0                    *
  4155. popswitch    dc.b    0                    *
  4156. diskbufferl equ    *-diskbuffer                    *
  4157. *                                *
  4158. *****************************************************************
  4159.  
  4160.         cnop    0,2
  4161. event        dcb.b    ie_SIZEOF,0    save area for inspection        
  4162.  
  4163.         section    data,bss
  4164. datarea    
  4165.  
  4166.         cnop    0,4
  4167. inthandler    ds.b    IS_SIZE interrupt handler
  4168. inputport    ds.l    1    port address
  4169.         cnop    0,4
  4170. inputreq    ds.l    IO_SIZE
  4171. insig        ds.l    1
  4172.         cnop    0,2
  4173. pause        ds.b    IOTV_SIZE    ioreq for delay
  4174. layer        ds.l    1
  4175. layers        ds.l    1
  4176. layerinfo     ds.l    1
  4177. tswitch        ds.l    1
  4178. oldmem        ds.l    1
  4179. class        ds.l    1
  4180. intuit        ds.l    1
  4181. timer        ds.l    1
  4182. totalmemory     ds.l     1
  4183. chipmemory     ds.l    1
  4184. oldchip        ds.l    1
  4185. oldfast        ds.l    1
  4186. task        ds.l    1        task pointer
  4187. wtfsecs        ds.l    2
  4188. wtbsecs        ds.l    2
  4189. wtbsecsnew    ds.l    2
  4190. frontwin    ds.l    1
  4191. backwin        ds.l    1
  4192. blankscreen    ds.l    1
  4193. spritesave    ds.l    1
  4194. spriteblank    ds.l    1
  4195. windowtab    ds.l    240
  4196. windowtabl    equ    *-windowtab
  4197. blanktimer    ds.w    1    
  4198. pointtimer    ds.w    1    
  4199. mouseleft    ds.b    1
  4200. mouseright    ds.b    1
  4201. action        ds.b    1
  4202. revswitch    ds.b    1
  4203. eventadd    ds.b    1
  4204. frontswitch    ds.b    1                    *
  4205. backswitch    ds.b    1                    *
  4206. blankdone    ds.b    1
  4207. pointdone    ds.b    1
  4208. lsw        ds.b    1
  4209. lalt        ds.b    1
  4210. lamiga        ds.b    1
  4211. menuswitch    ds.b    1
  4212.  
  4213.     end
  4214.